Esempio n. 1
0
 public static void LinkMagicCubeManagerAndUI(MagicCubeManager manager, MainGameUI mainGameUI)
 {
     manager.LinkGameTimer(mainGameUI);
     manager.LinkUndoRedo(mainGameUI);
     manager.LinkProcessUndoRedoPossible(mainGameUI);
     manager.LinkProcessOpenMenu(mainGameUI);
 }
Esempio n. 2
0
 private void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Esempio n. 3
0
    // Start is called before the first frame update
    protected override void _start()
    {
        mainGameUI = FindObjectOfType <MainGameUI>();

        if (animator == null)
        {
            Debug.LogError("defina o animator");
        }
        else
        {
            Weapons[0].GetComponent <Punch>().SetAnimator(animator);
        }
    }
 public void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
         return;
     }
     mgbScript = mgb.GetComponent <MainGameBackend>();
     gameLost  = mgbScript.gameLost;
 }
    MainGameUIIsLoaded()     //This method is called when MainGameUI object has been created. It should be called only once.
    {
        _mainGameUI = MainGameUI.Instance;

        //Removing all existing trees on UI
        UITree.Instance.removeAllTrees();
        //Generating _fields structure
        List <FieldVector> _fieldsCoordinates = _mainGameUI.GetListOfFieldsCoordinates();

        foreach (FieldVector coordinate in _fieldsCoordinates)
        {
            Field field = new Field();
            field._vector = coordinate;
            _fields.Add(field);
        }
    }
Esempio n. 6
0
 void Awake()
 {
     SharedInstance = this;
 }
Esempio n. 7
0
 public void LinkProcessOpenMenu(MainGameUI mainGameUI)
 {
     mainGameUI.SetMenuAction(MainGameLogic.GetMainCamera().GetComponent <UIManager>().OpenGameMenu);
 }
Esempio n. 8
0
 public void LinkProcessUndoRedoPossible(MainGameUI mainGameUI)
 {
     processUndoRedoPossible = mainGameUI.ProcessUndoRedoList;
 }
Esempio n. 9
0
 public void LinkUndoRedo(MainGameUI mainGameUI)
 {
     mainGameUI.SetUndoRedoActions(UndoLastMove);
 }
Esempio n. 10
0
 public void LinkGameTimer(MainGameUI mainGameUI)
 {
     updateTime = mainGameUI.SetTimer;
 }