public override void OnSceneLoad() { Debug.Log("Carregou cena Playground"); var camManager = InstantiateUtils.Instantiate <CameraManager> (); camManager.Initialize(); }
public static void Create(GameObject infoPopupPrefab, Vector3 position, string msg) { var infoPopupPrefabCreated = InstantiateUtils.Instantiate(infoPopupPrefab, position, Quaternion.identity); var popupController = infoPopupPrefabCreated.GetComponent <InfoPopupController>(); popupController.Setup(msg); }
private void Awake() { var settings = GameObject.Find("ApplicationController").GetComponent <Settings>(); grid = new GridScript(settings.cellSize, settings.numberOfCellInLine, settings.numberOfCellInColumn); InstantiateUtils.Instantiate(levelController, transform); InstantiateUtils.Instantiate(UiInGameCanvas, transform); }
void Awake() { DontDestroyOnLoad(transform.gameObject); //Avoid duplicates if (FindObjectsOfType(GetType()).Length > 1) { Destroy(gameObject); } InstantiateUtils.Instantiate(gameSceneController); }
private void Start() { InstantiateUtils.Instantiate(backgroundGrid, new Vector3(0, 0), Quaternion.identity, transform); //Trees InstantiateUtils.Instantiate(tree, new Vector3(20, 3), Quaternion.identity, transform); InstantiateUtils.Instantiate(tree, new Vector3(20, 4), Quaternion.identity, transform); InstantiateUtils.Instantiate(tree, new Vector3(20, 5), Quaternion.identity, transform); InstantiateUtils.Instantiate(tree, new Vector3(19, 4), Quaternion.identity, transform); InstantiateUtils.Instantiate(berryTree, new Vector3(19, 0), Quaternion.identity, transform); InstantiateUtils.Instantiate(berryTree, new Vector3(18, 1), Quaternion.identity, transform); //TownHall InstantiateUtils.Instantiate(townHall, new Vector3(8, 3), Quaternion.identity, transform); //Human InstantiateUtils.Instantiate(human, new Vector3(9.5f, 2), Quaternion.identity, transform); }
private void createHuman() { spriteRenderer.sprite = door_open; doCreateHuman = false; InstantiateUtils.Instantiate(humanPrefab, getDoorPosition(), Quaternion.identity); }