Beispiel #1
0
 void OnWaveEnd(PubSub.Signal signal)
 {
     horniness += GameMgr.Instance.hpRegenPerLevel;
     if (horniness > MAX_HORNINESS)
     {
         horniness = 100;
     }
 }
Beispiel #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);
        }
Beispiel #3
0
    void OnBulletHellEnd(PubSub.Signal s)
    {
        isFiring = false;

        foreach (EmitterSet e in emitterSets)
        {
            e.gameObject.SetActive(false);
        }
    }
Beispiel #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;
            }
        }
    }
Beispiel #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);
    }
 void ChangeStateToPostBulletHell(PubSub.Signal s)
 {
     ChangeState(WalkingStates.PostBulletHell);
 }
 void OnPlayerDead(PubSub.Signal s)
 {
     Debug.Log("You Died!");
     PersistentData.levelsDefeated = level;
     FadeOutOverlay.Instance.FadeOut(1.5f, () => Application.LoadLevel("GameOver"));
 }
Beispiel #8
0
 void StopBulletHell(PubSub.Signal s)
 {
     StopSweating();
     animator.speed = 1f;
 }
Beispiel #9
0
 void StartBulletHell(PubSub.Signal s)
 {
     StartSweating();
 }
Beispiel #10
0
 void OnPostBulletHellExit(PubSub.Signal s)
 {
     parentScroller.NextLocation();
     ResetSprites();
     Debug.Log("[BackgroundScroller] should change bg");
 }