Exemplo n.º 1
0
        public override void Attack(GameObject target, ContentManager content, ProjectileManager projMan)
        {
            Vector2 corrected = Vector2.Add(position, new Vector2(16, 16));

            for (int x = 0; x < 4; x++)
            {
                Fireball projectile = new Fireball(corrected, 0, this, 1, 0);
                Vector2  direction  = MovementManager.getNormalizedVector(projectile.position, circleFire(x));
                projectile.setDestination(direction, circleFire(x));
                projectile.LoadContent(content);
                projMan.proj.Add(projectile);
            }
        }
Exemplo n.º 2
0
 //  On skill key press, conjur a fireball and send it to target location
 //  TyNote: Create a fireball unit and set destination to target location (not homing). Dies on first collision or at end of path.
 //  TyDo: Fireball has a life timer
 //  TyDo: Make this a spell. For now, it's implemented as the autoattack
 public void fireball(ProjectileManager projMan, ContentManager content, GameObject target, Vector2 destination)
 {
     Fireball fireballTest = null;
     if (!fireballTimer.Enabled)
     {
         fireballTimer.Start();
         fireballTest = new Fireball(this.position,10, target, 1, 0);
         this.myArrow = fireballTest;
         Vector2 direction = MovementManager.getNormalizedVector(this.position, destination);
         fireballTest.setDestination(direction, destination);
         fireballTest.LoadContent(content);
         projMan.proj.Add(fireballTest);
         this.animateState = "attack";
         this.animateTime = 0;
     }
 }
Exemplo n.º 3
0
        //  On skill key press, conjur a fireball and send it to target location
        //  TyNote: Create a fireball unit and set destination to target location (not homing). Dies on first collision or at end of path.
        //  TyDo: Fireball has a life timer
        //  TyDo: Make this a spell. For now, it's implemented as the autoattack
        public void fireball(ProjectileManager projMan, ContentManager content, GameObject target, Vector2 destination)
        {
            Fireball fireballTest = null;

            if (!fireballTimer.Enabled)
            {
                fireballTimer.Start();
                fireballTest = new Fireball(this.position, 10, target, 1, 0);
                this.myArrow = fireballTest;
                Vector2 direction = MovementManager.getNormalizedVector(this.position, destination);
                fireballTest.setDestination(direction, destination);
                fireballTest.LoadContent(content);
                projMan.proj.Add(fireballTest);
                this.animateState = "attack";
                this.animateTime  = 0;
            }
        }
Exemplo n.º 4
0
 public override void Attack(GameObject target, ContentManager content, ProjectileManager projMan)
 {
     Vector2 corrected = Vector2.Add(position, new Vector2(16, 16));
     for (int x = 0; x < 4; x++)
     {
         Fireball projectile = new Fireball(corrected, 0, this, 1, 0);
         Vector2 direction = MovementManager.getNormalizedVector(projectile.position, circleFire(x));
         projectile.setDestination(direction, circleFire(x));
         projectile.LoadContent(content);
         projMan.proj.Add(projectile);                      
         
     }
     
 }