public override void OnEnter() { UpdaterProxy.Get().SetPause(true); Time.timeScale = 0; PlayerManagerProxy.Get().ResetStat(); this.RegisterAsListener("Game", typeof(GameFlowEvent)); }
private void Jump() { if (m_Grounded || m_JumpCount < PlayerManagerProxy.Get().GetPlayerStat().m_JumpNumber) { m_JumpCount++; m_Mover.CancelYVelocity(); m_Mover.ApplyForce(new Vector2(0f, m_JumpForce)); } }
private void OnEnable() { PlayerManagerProxy.Get().RegiterStatChangeCallback(this); m_Health = GameObject.FindGameObjectWithTag("Player").GetComponent <Health> (); this.RegisterAsListener("Player", typeof(DamageGameEvent)); int hp = PlayerManagerProxy.Get().GetPlayerStat().m_HP; Draw(hp, hp); }
public override void OnEnter() { GameObject player = PlayerManagerProxy.Get().GetPlayer(); m_Health = player.GetComponent <Health>(); m_Sprite = player.GetComponent <SpriteRenderer>(); m_Health.Enable(false); m_InvulnerabilitySecondsDelay = m_InvulnerabilitySeconds; m_Sprite.enabled = false; }
void CloseProxies() { PlayerManagerProxy.Close(m_PlayerManager); SaveManagerProxy.Close(m_SaveManager); SoundManagerProxy.Close(m_SoundManager); LevelManagerProxy.Close(m_LevelManager); InputManagerProxy.Close(m_InputManager); GameEventManagerProxy.Close(m_GameEventManager); UpdaterProxy.Close(m_Updater); LoggerProxy.Close(m_Logger); }
void OpenProxies() { LoggerProxy.Open(m_Logger); UpdaterProxy.Open(m_Updater); GameEventManagerProxy.Open(m_GameEventManager); InputManagerProxy.Open(m_InputManager); LevelManagerProxy.Open(m_LevelManager); SoundManagerProxy.Open(m_SoundManager); SaveManagerProxy.Open(m_SaveManager); PlayerManagerProxy.Open(m_PlayerManager); }
public override void Execute() { PlayerManagerProxy.Get().ResetStat(); LevelManagerProxy.Get().Reset(); new GameFlowEvent(EGameFlowAction.Quit).Push(); }
private void OnDisable() { this.UnregisterAsListener("Player"); PlayerManagerProxy.Get().UnregiterStatChangeCallback(this); }
public void AbandonRun() { PlayerManagerProxy.Get().ResetStat(); new GameFlowEvent(EGameFlowAction.Quit).Push(); }
public void SaveAndQuit() { PlayerManagerProxy.Get().SaveStat(); new GameFlowEvent(EGameFlowAction.Quit).Push(); }
private void OnEnable() { PlayerManagerProxy.Get().RegiterStatChangeCallback(this); Draw(PlayerManagerProxy.Get().GetPlayerStat()); }
private void OnDisable() { PlayerManagerProxy.Get().UnregiterStatChangeCallback(this); }
public override int GetModifiedDamage() { return(m_Damage + PlayerManagerProxy.Get().GetPlayerStat().m_Magic); }
public override int GetModifiedDamage() { return(m_Damage + 2 * PlayerManagerProxy.Get().GetPlayerStat().m_Force); }