コード例 #1
0
ファイル: HeartManager.cs プロジェクト: jyb5723/diceRolling
 //For switching halffull modes (full to half vice versa)
 public void AddHalf()
 {
     switch (halfFull)
     {
         case HalfChoices.full:
             halfFull = HalfChoices.half;
             break;
         case HalfChoices.half:
             halfFull = HalfChoices.full;
             break;
     }
 }
コード例 #2
0
ファイル: HeartManager.cs プロジェクト: jyb5723/diceRolling
 //False is remove, true is add
 //This code is just for games that say remove 8 hearts or add 2 hearts
 public void RemoveAddHearts(int number, HalfChoices hF, int howManyTimes, bool removeAdd, HeartChoices hC)
 {
     heartAdd = hC; //We set the heart adding mode to the local var
     halfFull = hF; //Same for half full ^^
     heartNumber = number; //Setting our heart number to local var
     for (int i = 0; i < howManyTimes; i++) //How many times is like 3 for 3 hearts and so on
     {
         if (!removeAdd) //If your removing (false is remove) remove a heart
         {
             RemoveHeart();
         }
         else if (removeAdd) //if your adding (true is adding) add a heart
         {
             AddHeart();
         }
     }
 }
コード例 #3
0
ファイル: HeartManager.cs プロジェクト: jyb5723/diceRolling
 //On start
 public void Awake()
 {
     oldMaxHearts = maxHearts; //This is only so we can change how many heart containers you see
     halfFull = HalfChoices.full; //Setting adding mode to half
     heartAdd = HeartChoices.Red; //Setting adding mode to red
     Refresh(); //Refresh screen!
 }