コード例 #1
0
ファイル: Customisation.cs プロジェクト: JamesNemeth/TAFE-RPG
    public void Save()
    {
        //Nsw Char Base Info
        player.maxHealth  = 100;
        player.maxMana    = 100;
        player.maxStamina = 100;

        player.curHealth  = player.maxHealth;
        player.curMana    = player.maxMana;
        player.curStamina = player.maxStamina;

        player.skinIndex    = skinIndex;
        player.eyesIndex    = eyesIndex;
        player.mouthIndex   = mouthIndex;
        player.hairIndex    = hairIndex;
        player.clothesIndex = clothesIndex;
        player.armourIndex  = armourIndex;

        player.charClass     = charClass;
        player.characterName = characterName;
        for (int i = 0; i < playerStats.Length; i++)
        {
            player.stats[i].value = (playerStats[i].statValue + playerStats[i].tempStat);
        }
        saveNew.Save();
        SceneManager.LoadScene(2);
    }
コード例 #2
0
ファイル: PlayerHandler.cs プロジェクト: xTOYE/JRS-R-G
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("CheckPoint"))
     {
         curCheckPoint = other.transform;
         healRate      = 5;
         saveAndLoad.Save();
     }
 }
コード例 #3
0
ファイル: PlayerHandler.cs プロジェクト: JamesNemeth/TAFE-RPG
 private void OnTriggerEnter(Collider other)
 {
     // if you get to a checkpoint, the game will save and you will heal faster
     if (other.gameObject.CompareTag("CheckPoint"))
     {
         curCheckPoint = other.transform;
         healRate      = 5;
         saveAndLoad.Save();
     }
 }
コード例 #4
0
 public void OnTriggerExit(Collider other)
 {
     if (other.gameObject.tag == "CheckPoint")
     {
         for (int i = 0; i < attributes.Length; i++)
         {
             attributes[i].regenValue -= 7;
         }
         PlayerSaveAndLoad.Save();
     }
 }
コード例 #5
0
ファイル: PlayerHandler.cs プロジェクト: Nicko141/GameSystems
 public void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("CheckPoint"))
     {
         currentCheckPoint = other.transform;
         for (int i = 0; i < attributes.Length; i++)
         {
             attributes[i].regenValue += 7;
         }
         PlayerSaveAndLoad.Save();
     }
 }