Exemplo n.º 1
0
 IEnumerator WaitForSnafu()
 {
     while (snafuSystemCompletion)
     {
         if (LIFES.Count < 3)
         {
             AddLife(DropScriptableObject.GetInventoryItem_SM("life").GetComponent <Item>()); // can type heart instead
             snafuSystem.S         = snafuSystem.N = snafuSystem.A = snafuSystem.F = snafuSystem.U = false;
             snafuSystemCompletion = false;
             HUDSystems.UpdateInventory();
         }
         yield return(new WaitForSeconds(2));
     }
 }
Exemplo n.º 2
0
    static public void DirectToReplace(PlayerInfo playerInfo)
    {
        S.lifes      = playerInfo.lifes;
        S.armors     = playerInfo.armors;
        S.bulletRate = playerInfo.bulletRate;
        S.bulletTime = playerInfo.bulletTime;
        S.reflex     = playerInfo.reflex;
        S.speedBoost = playerInfo.speedBoost;
        S.freezeTime = playerInfo.freezeTime;
        S.energy     = playerInfo.energy;
        S.autoFire   = playerInfo.autoFire;

        for (int i = 0; i < S.lifes; i++)
        {
            AddLife(DropScriptableObject.GetInventoryItem_SM("life").GetComponent <Item>());
        }
        for (int i = 0; i < S.armors; i++)
        {
            AddArmor(DropScriptableObject.GetInventoryItem_SM("armor").GetComponent <Item>());
        }
        HUDSystems.UpdateInventory();
    }
Exemplo n.º 3
0
 public void SnafuComplete()
 {
     if (!snafuSystemCompletion)
     {
         if (snafuSystem.S && snafuSystem.N && snafuSystem.A && snafuSystem.F && snafuSystem.U)
         {
             snafuSystemCompletion = true;
             AchievementManager.AchievementStep(Achievement.eStepType.snafuCompleted, 1);
             if (LIFES.Count < 3)
             {
                 AddLife(DropScriptableObject.GetInventoryItem_SM("life").GetComponent <Item>()); // can type heart instead
                 snafuSystem.S         = snafuSystem.N = snafuSystem.A = snafuSystem.F = snafuSystem.U = false;
                 snafuSystemCompletion = false;
                 HUDSystems.UpdateInventory();
             }
             else
             {
                 StartCoroutine(WaitForSnafu());
             }
         }
     }
 }
Exemplo n.º 4
0
    void GetAllDataFromSO()
    {
        // changable data in-game
        lifes      = Warpaid.PlayersSO.playerLifes;
        armors     = Warpaid.PlayersSO.playerArmors;
        bulletRate = Warpaid.PlayersSO.bulletDelta;
        reflex     = Warpaid.PlayersSO.reflex;
        speedBoost = Warpaid.PlayersSO.speedBoost;
        energy     = Warpaid.PlayersSO.energy;

        particleSystems = Warpaid.PlayersSO.particlePrefabs;
        for (int i = 0; i < lifes; i++)
        {
            AddLife(DropScriptableObject.GetInventoryItem_SM("life").GetComponent <Item>());
        }
        for (int i = 0; i < armors; i++)
        {
            AddArmor(DropScriptableObject.GetInventoryItem_SM("armor").GetComponent <Item>());
        }

        // innocent
        transform.name = playerName = Warpaid.PlayersSO.playerName; // save's name
    }
    static public DropScriptableObject S; // This Scriptable Object is an unprotected Singleton

    public DropScriptableObject()
    {
        S = this; // Assign the Singleton as part of the constructor.
    }