Exemple #1
0
 void OnEnable()
 {
     PersistentDataManager.RegisterPersister(this);
     m_playerScore = PlayerScore;
     //MoneyUI.instance.CoinBagLoadToScore(m_playerScore);
     OnScoreSet.Invoke(this);
     //MoneyUI.instance.CoinBagLoadToScore(m_playerScore);
 }
Exemple #2
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
 void OnEnable()
 {
     collider = GetComponent <CircleCollider2D>();
     PersistentDataManager.RegisterPersister(this);
 }
 private void OnEnable()
 {
     PersistentDataManager.RegisterPersister(this);
 }