Пример #1
0
 void OnWaveEnd(PubSub.Signal signal)
 {
     horniness += GameMgr.Instance.hpRegenPerLevel;
     if (horniness > MAX_HORNINESS)
     {
         horniness = 100;
     }
 }
Пример #2
0
		public void Publish(Channel type, object sender, Hashtable data) {
			Signal s = new Signal(type, sender, data);
			
			PubSubDelegate del = null;
			if (_dict.TryGetValue(type, out del))
                if (del != null)
                    del(s);
        }
Пример #3
0
    void OnBulletHellEnd(PubSub.Signal s)
    {
        isFiring = false;

        foreach (EmitterSet e in emitterSets)
        {
            e.gameObject.SetActive(false);
        }
    }
Пример #4
0
    void OnBulletHellStart(PubSub.Signal s)
    {
        isFiring = true;
        WalkingStateMachine w = s.sender as WalkingStateMachine;

        if (w != null)
        {
            Debug.Log("[BulletSpawner] Adjusting difficulty to: " + (intervalRatio * GameMgr.Instance.difficultyInterval));
            if (((float)w.level * GameMgr.Instance.difficultyInterval) > 0.0f)
            {
                intervalRatio *= GameMgr.Instance.difficultyInterval;
            }
        }
    }
Пример #5
0
    void OnCollideWithBullet(PubSub.Signal signal)
    {
        Debug.Log(signal.data["damage"]);
        if (signal.data != null && signal.data.ContainsKey("damage"))
        {
            horniness -= (int)signal.data["damage"];
        }
        else
        {
            horniness -= 10;
        }

        if (horniness <= 0 && !_isDead)
        {
            GameMgr.Instance.GetPubSubBroker().Publish(PubSub.Channel.PlayerDead, this);
            _isDead = true;
        }

        // Animations
//		SweatForSeconds(2f);
        IntensifyForSeconds(1f);
    }
Пример #6
0
 void ChangeStateToPostBulletHell(PubSub.Signal s)
 {
     ChangeState(WalkingStates.PostBulletHell);
 }
Пример #7
0
 void OnPlayerDead(PubSub.Signal s)
 {
     Debug.Log("You Died!");
     PersistentData.levelsDefeated = level;
     FadeOutOverlay.Instance.FadeOut(1.5f, () => Application.LoadLevel("GameOver"));
 }
Пример #8
0
 void StopBulletHell(PubSub.Signal s)
 {
     StopSweating();
     animator.speed = 1f;
 }
Пример #9
0
 void StartBulletHell(PubSub.Signal s)
 {
     StartSweating();
 }
Пример #10
0
 void OnPostBulletHellExit(PubSub.Signal s)
 {
     parentScroller.NextLocation();
     ResetSprites();
     Debug.Log("[BackgroundScroller] should change bg");
 }