Пример #1
0
 public Tank(GameWorld world)
     : base(world)
 {
     Mass = 0.05F;
       MaxForce = 200;
       MaxSpeed = 100;
       MaxTurnRate = 100;
       Position = new Vector2(500, 500);
       BoundingRadius = 16;
       Behavior = BehaviorType.Evade | BehaviorType.Wall_avoidance;
 }
Пример #2
0
 public Dummy(GameWorld world)
     : base(world)
 {
     Mass = 0.05F;
       MaxForce = 250;
       MaxSpeed = 150;
       MaxTurnRate = 100;
       Position = new Vector2(200, 200);
       BoundingRadius = 16;
       Behavior = BehaviorType.Arrive;
 }
Пример #3
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            TouchPanel.EnabledGestures = GestureType.Tap;
              m_World = new GameWorld();
              m_Controls = new GameControls();

              Tank t = new Tank(m_World);
              Dummy d = new Dummy(m_World);
              t.SetPursuer(d);
              m_World.GameEntities.Add(t);
              m_World.GameEntities.Add(d);

              base.Initialize();
        }
Пример #4
0
 public AutonomousEntity(GameWorld world)
     : base(world)
 {
 }
Пример #5
0
 public MovingEntity(GameWorld world)
     : base(world)
 {
     m_Steering = new SteeringBehavior(this);
       m_Steering.Walls.AddRange(world.Bounds);
 }
Пример #6
0
 public GameEntity(GameWorld world)
 {
     World = world;
 }