Ejemplo n.º 1
0
 public override void Enter()
 {
     CanvasGameStart.enabled = true;
     Manager.NewGame         = true;
     Manager.GameOver        = false;
     ManagerView.Get <BlackAnimationBack>().Curtain(Anim.Open);
 }
Ejemplo n.º 2
0
 public ProcessingScore()
 {
     _textScore            = ManagerView.Get <ContainerUIGameProcess>().FieldTextScore;
     _textScore.text       = "0";
     _session              = GameManager.Instance.Session;
     _session.ChangeScore += UpdateUIpanel;
 }
Ejemplo n.º 3
0
 public ProcessingCalculateSticks()
 {
     _inst                  = this;
     _filedAmountScore      = ManagerView.Get <ContainerUIGameProcess>().FieldTextAmountStick;
     _filedAmountScore.text = GameManager.Instance.Session.AmountStck.ToString();
     EventManager.StartListening("ChangeCountSticks", UpdateUI);
     EventManager.StartListening("ManyStick", ShowTitleManyStick);
 }
Ejemplo n.º 4
0
    public ProcessingHP()
    {
        _instance = this;
        _damage   = -1;
        _hpImages = ManagerView.Get <ContainerUIGameProcess>().ImageHP;
        foreach (var elemnt in _hpImages)
        {
            elemnt.gameObject.SetActive(true);
        }

        EventManager.StartListening("Damage", Damage);
    }
Ejemplo n.º 5
0
    public void Restart()
    {
        ManagerView.Get <BlackAnimationBack>().Curtain(Anim.Close);
        var gameState = FindState("GameState") as GameProcess;

        gameState.ClearScene();
        Time.timeScale = 1;
        NewGame        = true;
        GameOver       = false;
        ChangeState(null);
        Timer.Add(0.7f, () => InstanceState("GameState"));
    }
Ejemplo n.º 6
0
    public void GoToStartMenu()
    {
        ManagerView.Get <BlackAnimationBack>().Curtain(Anim.Close);

        var gameState = FindState("GameState") as GameProcess;

        gameState.ClearScene();
        Time.timeScale = 1;
        GameOver       = false;
        NewGame        = true;
        ChangeState("StartGame", 0.7f);
    }
Ejemplo n.º 7
0
    public override void Enter()
    {
        if (Manager.NewGame)
        {
            Manager.NewGame = false;

            Destroy(Manager.Session);
            Manager.Session = Instantiate(DataSessionGame);

            _systemECS = new SystemProcessings();
            _systemECS.Add <ProcessingCalculateSticks>();
            _systemECS.Add <ProcessingScore>();
            _systemECS.Add <ProcessingManyFruit>();
            _systemECS.Add <ProcessingHP>();


            ManagerView.Get <BlackAnimationBack>().Curtain(Anim.Open);
        }

        CanvasGameProcess.enabled = true;
        WaveFruit(Manager.Session.AmountFruit);
        InputManager.Instance.TouchScreen += ShotStick;
    }
Ejemplo n.º 8
0
 public override void Exit()
 {
     Timer.Add(0.5f, () => CanvasGameStart.enabled = false);
     ManagerView.Get <BlackAnimationBack>().Curtain(Anim.Close);
 }