예제 #1
0
 public void DestroyProjectile(EnergonProjectileObj projectile)
 {
     if (m_projectilePool.ActiveObjsList.Contains(projectile))
     {
         projectile.Visible          = false;
         projectile.Scale            = new Vector2(1f, 1f);
         projectile.CollisionTypeTag = 3;
         PhysicsMngr.RemoveObject(projectile);
         m_projectilePool.CheckIn(projectile);
     }
 }
예제 #2
0
        public void FireProjectile(byte type)
        {
            var energonProjectileObj = m_projectilePool.CheckOut();

            energonProjectileObj.SetType(type);
            PhysicsMngr.AddObject(energonProjectileObj);
            energonProjectileObj.Target       = m_target;
            energonProjectileObj.Visible      = true;
            energonProjectileObj.Position     = Position;
            energonProjectileObj.CurrentSpeed = ProjectileSpeed;
            energonProjectileObj.Flip         = Flip;
            energonProjectileObj.Scale        = ProjectileScale;
            energonProjectileObj.Opacity      = 0.8f;
            energonProjectileObj.Damage       = Damage;
            energonProjectileObj.PlayAnimation();
        }