示例#1
0
 public override void Attack(GameObject target, ContentManager content, ProjectileManager projMan)
 {
     //attackSound(content);
     Vector2 corrected = Vector2.Add(position, new Vector2(16, 16));
     Projectile projectile = new Rocktile(corrected, 100, target, 100, 0);
     Vector2 direction = MovementManager.getNormalizedVector(projectile.position, target.position);
     projectile.setDestination(direction, target.position);
     projectile.LoadContent(content);
     projMan.proj.Add(projectile);
     this.animateState = "attack";
     this.animateTime = 0;
 }
示例#2
0
        public override void Attack(GameObject target, ContentManager content, ProjectileManager projMan)
        {
            //attackSound(content);
            Vector2    corrected  = Vector2.Add(position, new Vector2(16, 16));
            Projectile projectile = new Rocktile(corrected, 100, target, 100, 0);
            Vector2    direction  = MovementManager.getNormalizedVector(projectile.position, target.position);

            projectile.setDestination(direction, target.position);
            projectile.LoadContent(content);
            projMan.proj.Add(projectile);
            this.animateState = "attack";
            this.animateTime  = 0;
        }