Exemple #1
0
 void OnShootRelease()
 {
     if (bladeHeld != null)
     {
         bladeHeld.Release();
         lastDirection = bladeHeld.Direction;
     }
     bladeHeld = null;
 }
Exemple #2
0
        void OnShootHold(Vector2 direction)
        {
            if (ammo < 1)
            {
                return;
            }

            if (IsHoldingBlade)
            {
                Debug.LogWarning("Trying to instantiate  blade hold, but already holding!");
                return;
            }

            bladeHeld           = Blade.CreateBlade(Transform, direction);
            bladeHeld.Direction = lastDirection;
            Ammo--;
        }