void OnEnable() { PersistentDataManager.RegisterPersister(this); m_playerScore = PlayerScore; //MoneyUI.instance.CoinBagLoadToScore(m_playerScore); OnScoreSet.Invoke(this); //MoneyUI.instance.CoinBagLoadToScore(m_playerScore); }
void OnEnable() { PersistentDataManager.RegisterPersister(this); m_CurrentHealth = startingHealth; OnHealthSet.Invoke(this); DisableInvulnerability(); }
void OnEnable() { if (s_Instance == null) { s_Instance = this; } else if (s_Instance != this) { throw new UnityException("There cannot be more than one PlayerInput script. The instances are " + s_Instance.name + " and " + name + "."); } PersistentDataManager.RegisterPersister(this); }
void OnEnable() { if (s_Instance == null) { s_Instance = this; watchFileCoroutine = StartCoroutine(characterStats.WatchFile()); characterStats.OnInputUpdate += UpdateControl; } else if (s_Instance != this) { throw new UnityException("There cannot be more than one PlayerInput script. The instances are " + s_Instance.name + " and " + name + "."); } PersistentDataManager.RegisterPersister(this); }
void OnEnable() { collider = GetComponent <CircleCollider2D>(); PersistentDataManager.RegisterPersister(this); }
private void OnEnable() { PersistentDataManager.RegisterPersister(this); }