Esempio n. 1
0
        public override void Update()
        {
            var ballMap = Game.GameManager.Navigation.PotentialMaps["BallMap"];

            if (PlayerAI.Player.Ball != null)
            {
                var target = Game.GameManager.Players[0];
                var dir    = target.Position - PlayerAI.Position;

                PlayerAI.AimAtPosition(target.Position);

                if (!PlayerAI.Player.IsShotCharging)
                {
                    PlayerAI.StartShotCharge();
                }

                if (PlayerAI.Player.IsShotCharged)
                {
                    PlayerAI.ShootCharged(dir);
                }
            }
            else if (Game.GameManager.Ball != null && Game.GameManager.Ball.Player == null)
            {
                PlayerAI.NavigateToBall();
            }
        }