public static void LinkMagicCubeManagerAndUI(MagicCubeManager manager, MainGameUI mainGameUI) { manager.LinkGameTimer(mainGameUI); manager.LinkUndoRedo(mainGameUI); manager.LinkProcessUndoRedoPossible(mainGameUI); manager.LinkProcessOpenMenu(mainGameUI); }
private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } }
// 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); } }
void Awake() { SharedInstance = this; }
public void LinkProcessOpenMenu(MainGameUI mainGameUI) { mainGameUI.SetMenuAction(MainGameLogic.GetMainCamera().GetComponent <UIManager>().OpenGameMenu); }
public void LinkProcessUndoRedoPossible(MainGameUI mainGameUI) { processUndoRedoPossible = mainGameUI.ProcessUndoRedoList; }
public void LinkUndoRedo(MainGameUI mainGameUI) { mainGameUI.SetUndoRedoActions(UndoLastMove); }
public void LinkGameTimer(MainGameUI mainGameUI) { updateTime = mainGameUI.SetTimer; }