void Awake() { managerBlocks = GameObject.FindGameObjectWithTag("Game_blocks").GetComponent <blocksManager>(); nextBlock = GameObject.FindGameObjectWithTag("Game_nextBlocks").GetComponent <nextBlockController>(); managerArena = GameObject.FindGameObjectWithTag("Game_arena").GetComponent <Arena>(); endGame = GameObject.FindGameObjectWithTag("Game_end").GetComponent <EndGame>(); controllerSettings = GameObject.FindGameObjectWithTag("Settings"); GetComponent <InputButton>().initiate(endGame, managerBlocks); GetComponent <InputSwipe>().initiate(endGame, managerBlocks, controllerSettings.GetComponent <Settings>()); GetComponent <InputTap>().initiate(endGame, managerBlocks, controllerSettings.GetComponent <Settings>()); gameObject.SetActive(false); }
void Start() { tile = new BlockTile[transform.childCount - 1]; for (int i = 0; i < transform.childCount - 1; ++i) { tile[i] = transform.GetChild(i).GetComponent <BlockTile>(); } managerArena = GameObject.FindGameObjectWithTag("Game_arena").GetComponent <Arena>(); managerBlocks = GameObject.FindGameObjectWithTag("Game_blocks").GetComponent <blocksManager>(); detector = transform.GetComponentInChildren <Detector>(); }
/*void Awake() { * endgame = FindObjectOfType<EndGame>(); * blocks = FindObjectOfType<blocksManager>(); * settings = FindObjectOfType<Settings>(); * }*/ public void initiate(EndGame end, blocksManager block, Settings sett) { endgame = end; blocks = block; settings = sett; }
/*void Awake() { * endgame = FindObjectOfType<EndGame>(); * blocks = FindObjectOfType<blocksManager>(); * }*/ public void initiate(EndGame end, blocksManager block) { endgame = end; blocks = block; }