public Environment(string asset) { modules = new Modules(); root = UnityUtils.CreateGameObject(asset); recTransform = root.GetComponent <RectTransform>(); }
public BaseScreen(string asset) { root = UnityUtils.CreateGameObject(asset); recTransform = root.GetComponent <RectTransform>(); screenAnimator = root.GetComponent <Animator>(); elements = new Dictionary <string, GameObject>(); duplicates = new HashSet <string>(); OnLoaded(); }
private void Initialize() { root = UnityUtils.CreateGameObject(PREFAB_PATH); if (root != null) { terrainContainer = UnityUtils.FindChildByName(root, TERRAIN_CONTAINER); objectsContainer = UnityUtils.FindChildByName(root, OBJECTS_CONTAINER); Object.DontDestroyOnLoad(root); } }
public AudioManager() { audioManager = UnityUtils.CreateGameObject(PREFAB_PATH); if (instance == null) { instance = this; } audioMixer = audioManager.GetComponent <AudioMixer>(); }
private void InitializeUniblocksGameObjects() { GameObject selectedBlockGraphics = UnityUtils.CreateGameObject("Data/Game/Uniblocks/UniblocksObjects/Other/selected block graphics"); selectedBlockGraphics.name = "selected block graphics"; UnityUtils.CreateGameObject("Data/Game/Uniblocks/UniblocksObjects/UniBlocks Engine"); UnityUtils.CreateGameObject("Data/Game/Uniblocks/UniblocksObjects/SimpleSun"); UnityUtils.CreateGameObject("Data/Game/DropDownTrigger"); GameObject player = UnityUtils.CreateGameObject("Data/Game/Uniblocks/UniblocksObjects/Player/Uniblocks Dude"); player.name = Constants.Game.SINGLE_PLAYER_NAME; player.transform.position = new Vector3(0, 52, 0); }
public void Initialize() { camera = UnityUtils.CreateGameObject(PREFAB_PATH); if (camera != null) { cam = camera.GetComponent <Camera>(); Object.DontDestroyOnLoad(camera); } var core = Service.Get <Core>(); if (core != null) { core.FrameUpdate += Update; } }
public DragObject() : base(PREFAB_PATH) { root = UnityUtils.CreateGameObject(PREFAB_PATH); }
public AudioManager() { audioManager = UnityUtils.CreateGameObject(PREFAB_PATH); }