예제 #1
0
 public override void OnEnter()
 {
     UpdaterProxy.Get().SetPause(true);
     Time.timeScale = 0;
     PlayerManagerProxy.Get().ResetStat();
     this.RegisterAsListener("Game", typeof(GameFlowEvent));
 }
예제 #2
0
 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));
     }
 }
예제 #3
0
    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);
    }
예제 #4
0
    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;
    }
예제 #5
0
 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);
 }
예제 #6
0
 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);
 }
예제 #7
0
 public override void Execute()
 {
     PlayerManagerProxy.Get().ResetStat();
     LevelManagerProxy.Get().Reset();
     new GameFlowEvent(EGameFlowAction.Quit).Push();
 }
예제 #8
0
 private void OnDisable()
 {
     this.UnregisterAsListener("Player");
     PlayerManagerProxy.Get().UnregiterStatChangeCallback(this);
 }
예제 #9
0
 public void AbandonRun()
 {
     PlayerManagerProxy.Get().ResetStat();
     new GameFlowEvent(EGameFlowAction.Quit).Push();
 }
예제 #10
0
 public void SaveAndQuit()
 {
     PlayerManagerProxy.Get().SaveStat();
     new GameFlowEvent(EGameFlowAction.Quit).Push();
 }
예제 #11
0
 private void OnEnable()
 {
     PlayerManagerProxy.Get().RegiterStatChangeCallback(this);
     Draw(PlayerManagerProxy.Get().GetPlayerStat());
 }
예제 #12
0
 private void OnDisable()
 {
     PlayerManagerProxy.Get().UnregiterStatChangeCallback(this);
 }
예제 #13
0
 public override int GetModifiedDamage()
 {
     return(m_Damage + PlayerManagerProxy.Get().GetPlayerStat().m_Magic);
 }
예제 #14
0
 public override int GetModifiedDamage()
 {
     return(m_Damage + 2 * PlayerManagerProxy.Get().GetPlayerStat().m_Force);
 }