示例#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");
 }