void OnWaveEnd(PubSub.Signal signal) { horniness += GameMgr.Instance.hpRegenPerLevel; if (horniness > MAX_HORNINESS) { horniness = 100; } }
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); }
void OnBulletHellEnd(PubSub.Signal s) { isFiring = false; foreach (EmitterSet e in emitterSets) { e.gameObject.SetActive(false); } }
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; } } }
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")); }
void StopBulletHell(PubSub.Signal s) { StopSweating(); animator.speed = 1f; }
void StartBulletHell(PubSub.Signal s) { StartSweating(); }
void OnPostBulletHellExit(PubSub.Signal s) { parentScroller.NextLocation(); ResetSprites(); Debug.Log("[BackgroundScroller] should change bg"); }