private void SpawnSimpleEnemy(GameTime gameTime) { SimpleEnemy e = new SimpleEnemy(); e.Transform.AbsoluteTransform.Translation = new Vector3(RandomHelper.GetRandomFloat(-200, 200), 2, RandomHelper.GetRandomFloat(-200, 200)); SystemCore.GameObjectManager.AddAndInitialiseGameObject(e); e.DesiredPosiiton = simulation.MainBase.Transform.AbsoluteTransform.Translation + new Vector3(0, 2, 0); }
public void PostInitialise() { mover = new EntityMover(physicsComponent.PhysicsEntity); rotator = new EntityRotator(physicsComponent.PhysicsEntity); SystemCore.PhysicsSimulation.Add(mover); SystemCore.PhysicsSimulation.Add(rotator); mover.LinearMotor.Settings.Servo.SpringSettings.Stiffness /= 10000; mover.LinearMotor.Settings.Servo.SpringSettings.Damping /= 1000; e = ParentObject as SimpleEnemy; }