Ejemplo n.º 1
0
 private void ShootProjectile(Projectile_Trajectory pt = Projectile_Trajectory.MEDIUM)
 {
     if (!PlayerProjectile.Active)
     {
         PlayerProjectile.Shoot(Position, GoingRight, pt);
         ChangeAnimationState(Animation_State.throwing);
         LockAnimation(Animations[ActiveAnimation]);
     }
 }
Ejemplo n.º 2
0
 public void Shoot(Vector2 spawnPosition, bool direction, Projectile_Trajectory pt = Projectile_Trajectory.MEDIUM)
 {
     GameObjectState            = GameObject_State.Air;
     ActiveAnimation            = Animation_State.jumping;
     Active                     = true;
     Position                   = spawnPosition + new Vector2(50, 15);
     ProjectileTrajectory       = pt;
     Velocity                   = Vector2.Zero;
     GoingRight                 = direction;
     ProjectileState            = Projectile_State.CHARGING;
     PositionRectangle.Location = Position.ToPoint();
     Wait        = 400;
     WaitCounter = 0;
 }
Ejemplo n.º 3
0
 //turn on / off the current projection line and line renderer
 public void TurnOnOffProjectileFromPreviousWeapon(bool status)
 {
     if (currentWeapon != null)
     {
         Projectile_Trajectory temp = currentWeapon.FiringPoint.GetComponent <Projectile_Trajectory>();
         if (temp != null)
         {
             LineRenderer line = currentWeapon.FiringPoint.GetComponent <LineRenderer>();
             if (line != null)
             {
                 line.enabled = status;
             }
             temp.enabled = status;
         }
     }
 }