Exemplo n.º 1
0
 public WanderBehavior(WarZGame game, AiPlayer player)
     : base(game, player)
 {
     _wanderDirection.X = (float)Math.Cos(player.FacingDirection);
     _wanderDirection.Z = (float)Math.Sin(player.FacingDirection);
     player.FullSpeed = true;
 }
Exemplo n.º 2
0
 public WanderBehavior(WarZGame game, AiPlayer player)
     : base(game, player)
 {
     _wanderDirection.X = (float)Math.Cos(player.FacingDirection);
     _wanderDirection.Z = (float)Math.Sin(player.FacingDirection);
     player.FullSpeed   = true;
 }
Exemplo n.º 3
0
        public void AddBot(Camera camera, Vector3 Position)
        {
            AiPlayer newAi = new AiPlayer(WZGame, camera, _defaultTank, WZGame.Terrain, idCount++)
            {
                Position = Position
            };

            //newAi.AddBehavior(new ChaseBehavior(WZGame, newAi, WZGame.Player1));
            newAi.AddBehavior(new GoingForwardBehavior(WZGame, newAi));
            //newAi.AddBehavior(new WanderBehavior(WZGame, newAi));
            AiPlayers.Add(newAi);
        }
Exemplo n.º 4
0
        public void AddBot(Camera camera, Vector3 Position)
        {
            AiPlayer newAi = new AiPlayer(WZGame, camera, _defaultTank, WZGame.Terrain, idCount++)
            {
                Position = Position
            };

            //newAi.AddBehavior(new ChaseBehavior(WZGame, newAi, WZGame.Player1));
            newAi.AddBehavior(new GoingForwardBehavior(WZGame, newAi));
            //newAi.AddBehavior(new WanderBehavior(WZGame, newAi));
            AiPlayers.Add(newAi);
        }
Exemplo n.º 5
0
 public AiPlayerBehavior(WarZGame game, AiPlayer player)
 {
     _aiPlayer = player;
     WZGame = game;
     _enabled = true;
 }
Exemplo n.º 6
0
 public AiPlayerBehavior(WarZGame game, AiPlayer player)
 {
     _aiPlayer = player;
     WZGame    = game;
     _enabled  = true;
 }
Exemplo n.º 7
0
 public ChaseBehavior(WarZGame game, AiPlayer aiPlayer, Player player)
     : base(game, aiPlayer)
 {
     _aiPlayer.FullSpeed = true;
     _player             = player;
 }
Exemplo n.º 8
0
 public GoingForwardBehavior(WarZGame game, AiPlayer aiPlayer)
     : base(game, aiPlayer)
 {
     aiPlayer.FullSpeed = true;
 }
Exemplo n.º 9
0
 public ChaseBehavior(WarZGame game, AiPlayer aiPlayer, Player player)
     : base(game,aiPlayer)
 {
     _aiPlayer.FullSpeed = true;
     _player = player;
 }
Exemplo n.º 10
0
 public GoingForwardBehavior(WarZGame game, AiPlayer aiPlayer)
     : base(game, aiPlayer)
 {
     aiPlayer.FullSpeed = true;
 }