Beispiel #1
0
    private void Update()
    {
        hudTimer.text = hudTimerText;

        playerOneHealthBarBlue.value = playerOneCharacterData.GetRecoveryHP();
        playerOneHealthBarRed.value  = playerOneCharacterData.GetCurrentHP();
        playerOneHealthText.text     = playerOneCharacterData.GetCurrentHP().ToString();

        playerTwoHealthBarBlue.value = playerTwoCharacterData.GetRecoveryHP();
        playerTwoHealthBarRed.value  = playerTwoCharacterData.GetCurrentHP();
        playerTwoHealthText.text     = playerTwoCharacterData.GetCurrentHP().ToString();
    }
Beispiel #2
0
 //constructor
 public SaveData(WorldData worldData, PlayerCharacterData playerCharacterData)
 {
     // World Data
     this.worldType      = worldData.GetWorldType();
     this.gameEnding     = worldData.GetGameEnding();
     this.bossesDefeated = worldData.GetBossesDefeated();
     this.finishGameTime = worldData.GetFinishGameTime();
     this.playTime       = worldData.GetPlayTime();
     // Player Character Persistent Data
     this.currentHP          = playerCharacterData.GetCurrentHP();
     this.primaryWeapon      = playerCharacterData.GetPrimaryWeapon();
     this.secondaryWeapon    = playerCharacterData.GetSecondaryWeapon();
     this.locationSceneIndex = playerCharacterData.GetLocationSceneIndex();
 }