Example #1
0
        public Environment(string asset)
        {
            modules = new Modules();

            root         = UnityUtils.CreateGameObject(asset);
            recTransform = root.GetComponent <RectTransform>();
        }
Example #2
0
        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();
        }
Example #3
0
        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);
            }
        }
Example #4
0
        public AudioManager()
        {
            audioManager = UnityUtils.CreateGameObject(PREFAB_PATH);

            if (instance == null)
            {
                instance = this;
            }

            audioMixer = audioManager.GetComponent <AudioMixer>();
        }
Example #5
0
        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);
        }
Example #6
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;
            }
        }
Example #7
0
 public DragObject() : base(PREFAB_PATH)
 {
     root = UnityUtils.CreateGameObject(PREFAB_PATH);
 }
Example #8
0
 public AudioManager()
 {
     audioManager = UnityUtils.CreateGameObject(PREFAB_PATH);
 }