Наследование: Model.Entity
Пример #1
0
		private void Awake()
		{
			GameObject uiCanvas = GameObject.Find("/UICanvas");
			uiCanvas.GetComponent<Canvas>().worldCamera = GameObject.Find("/Camera").GetComponent<Camera>();
			this.Root = new UI(this.GetOwner<Scene>(), UIType.Root, null, uiCanvas);
			this.Load();
		}
Пример #2
0
		public UI(Scene scene, UIType uiType, UI parent, GameObject gameObject) : base(EntityType.UI)
		{
			this.Scene = scene;
			this.UIType = uiType;

			gameObject.transform.SetParent(parent?.GameObject.transform);
			this.GameObject = gameObject;
			this.AddComponent<ChildrenComponent<UI>>();
		}
Пример #3
0
        public UI Create(Scene scene, UIType type, UI parent)
        {
            GameObject mainPrefab = Resources.Load<GameObject>("UI/LoginPanel");
            mainPrefab = Object.Instantiate(mainPrefab);
			mainPrefab.layer = LayerMask.NameToLayer(LayerNames.UI);

			UI ui = new UI(scene, type, parent, mainPrefab);
			parent.AddChild(ui);
            
            return ui;
        }
 public void Add(UIType type, UI ui)
 {
     this.uis.Add(type, ui);
 }
Пример #5
0
 public void Add(UI ui)
 {
     this.children.Add(ui.Name, ui);
     ui.Parent = this;
 }
Пример #6
0
		public void Add(UIType type, UI ui)
		{
			this.uis.Add(type, ui);
		}