Пример #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);
 }