コード例 #1
0
ファイル: JourneyPhysics.cs プロジェクト: jvalen/moonhop
        private void Awake()
        {
            UpdateCurrentAtmosphereLayerValues(atmosphereLayers[currentLayerIndex]);

            ElapsedTimePersistentObject = GameObject.FindObjectOfType <ElapsedTime>();
            ScorePersistentObject       = GameObject.FindObjectOfType <Score>();
            ElapsedTimePersistentObject.SetElapsedTime(0);
            ScorePersistentObject.SetScore(0);

            health = GameObject.FindWithTag("Player").GetComponent <Health>();
            pickup = GameObject.FindWithTag("Player").GetComponent <PickupItem>();

            health.onTakenDamage     += StoppedByHit;
            health.onDead            += Falling;
            pickup.onPickupItemBoost += Boost;
        }
コード例 #2
0
ファイル: JourneyPhysics.cs プロジェクト: jvalen/moonhop
 public void Falling()
 {
     isDead = true;
     ElapsedTimePersistentObject.SetElapsedTime(-1);
     StartCoroutine(ReverseSpeed());
 }