Exemplo n.º 1
0
 void Start()
 {
     if (_saveManager.CheckLoad())
     {
         btnContinue.interactable = true;
     }
 }
Exemplo n.º 2
0
    public override void Activate()
    {
        // Set dependencies
        SetDependecies(LoadManager.LogicManager.BaseManagers.SaveManager,
                       LoadManager.LogicManager.BaseManagers.AnimaManager,
                       LoadManager.LogicManager.BaseManagers.Publisher, LoadManager.LogicManager.BaseManagers.AudioManager);
        var clickHandler = _buttGameObject.GetComponent <ClickHandlerMenu>();

        if (clickHandler == null)
        {
            throw new UnityException("There is no MouseClickHandler script on UI object");
        }

        var uiButtonsMenu = _buttGameObject.GetComponent <UiButtonsMenu>();

        if (uiButtonsMenu == null)
        {
            throw new UnityException("There is no MouseClickHandler script on UI object");
        }

        clickHandler.SetDependecies(_animaManager);
        uiButtonsMenu.SetDependecies(_saveManager, _animaManager, _publisher);
        if (_saveManager.CheckLoad())
        {
            _btnContinue.interactable = true;
        }
        _publisher.Publish(this, new CustomEventArgs(GameEventName.GoStageMainMenu));
    }
Exemplo n.º 3
0
 public void ToNewGame()
 {
     if (_saveManager.CheckLoad())
     {
         var parent = transform.parent;
         _animaManager.SetStateAnimation(parent.gameObject, "new_if_save", true);
     }
     else
     {
         var parent = transform.parent;
         _animaManager.SetStateAnimation(parent.gameObject, "fading", true);
         _publisher.Publish(this, new CustomEventArgs(GameEventName.GoStageStartNewGame, null));
     }
 }
Exemplo n.º 4
0
 public void ToNewGame()
 {
     if (_saveManager.CheckLoad())
     {
         var parent = transform.parent.parent;
         _animaManager.SetStateAnima(parent.gameObject, "new_if_save", true);
         _animaManager.SetStateAnima(parent.gameObject, "open", false);
     }
     else
     {
         var parent = transform.parent;
         _animaManager.SetStateAnima(parent.gameObject, "fading", true);
     }
 }
Exemplo n.º 5
0
 public override void Activate()
 {
     SetDependecies(LoadManager.LogicManager);
     if (_saveManager.CheckLoad())
     {
         //TODO Continue game
         Debug.Log("Continue");
     }
     else
     {   //-------------стадия начало игры
         CreateDependecies();
         // TODO пофиксить
         var gameclass = _objectStorage.GetCardByName("Purple") as CardsGameClass;
         _publisher.Publish(this, new CustomEventArgs(GameEventName.GoSaveGameClass, gameclass));
     }
 }
Exemplo n.º 6
0
    void Start()
    {
        /*SetDependecies(GameObject.Find("Bootstrapper").GetComponent<Bootstrapper>().saveManager,
         *  GameObject.Find("Bootstrapper").GetComponent<Bootstrapper>().animaManager ,
         *  GameObject.Find("Bootstrapper").GetComponent<Bootstrapper>().publisher  );*/

        _deck       = (GameObject.Find("Deck"));
        _popupClass = (GameObject.Find("PopupClass"));
        _popupClass.transform.localPosition = new Vector3(0f, 0f, 0f);
        _popupClass.SetActive(false);

        if (_saveManager.CheckLoad())
        {
            Debug.Log("Continue game");
        }
        else
        {
            Debug.Log("New game");
            StartCoroutine("SpawnCardClass"); //заспавним 3 карты класссов
        }
    }