示例#1
0
        public override void OnSceneLoad()
        {
            Debug.Log("Carregou cena Playground");
            var camManager = InstantiateUtils.Instantiate <CameraManager> ();

            camManager.Initialize();
        }
示例#2
0
    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);
    }
示例#3
0
    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);
    }
示例#4
0
    void Awake()
    {
        DontDestroyOnLoad(transform.gameObject);
        //Avoid duplicates
        if (FindObjectsOfType(GetType()).Length > 1)
        {
            Destroy(gameObject);
        }

        InstantiateUtils.Instantiate(gameSceneController);
    }
示例#5
0
    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);
    }
示例#6
0
 private void createHuman()
 {
     spriteRenderer.sprite = door_open;
     doCreateHuman         = false;
     InstantiateUtils.Instantiate(humanPrefab, getDoorPosition(), Quaternion.identity);
 }