Exemplo n.º 1
0
        public AI(float rotation, Vector2 position, float hp, int maxRange, int idealRange, Tank tank) : base(rotation, position, hp)
        {
            attackDelay = new Timer(1.5f);
            player      = tank;

            distFromEnemyCenter = (collider.Position.Distance((collider as BoxCollider).TopLeftPoint) + 10 + 5);
            healthBar           = new EnemyHealth(Position + (-Vector2.Up * distFromEnemyCenter), 80, 10);

            bounds = new Bounds(position, maxRange, idealRange);
        }
Exemplo n.º 2
0
 void GenerateObjects()
 {
     tank = new Tank("tankBlue_outline.png", "barrelBlue.png", -90 * (float)(MathF.PI / 180.0f), Program.Center);
     barrel.Load("barrelGreen_up.png");
     barrel.SetPosition(Program.Center.x + 160, Program.Center.y - 150);
 }