void Awake(){
			instance = (UI)target;
			
			int enumLength = Enum.GetValues(typeof(UI._BuildMode)).Length;
			buildModeLabel=new string[enumLength];
			buildModeTooltip=new string[enumLength];
			for(int i=0; i<enumLength; i++){
				buildModeLabel[i]=((UI._BuildMode)i).ToString();
				if((UI._BuildMode)i==UI._BuildMode.PointNBuild) 
					buildModeTooltip[i]="A build mode where player first select a build point and then choose which tower to build";
				if((UI._BuildMode)i==UI._BuildMode.DragNDrop) 
					buildModeTooltip[i]="A build mode where all the tower buttons are always on show. Player simply click on the button of the tower and bring the tower to the spot which it needs to be built";
			}
			
			EditorUtility.SetDirty(instance);
		}
예제 #2
0
 void Awake()
 {
     instance = this;
 }
예제 #3
0
		public void ToggleFF(){
			if(toggleFastForward.isOn) Time.timeScale=UI.GetFFTime();
			else Time.timeScale=1;
		}
예제 #4
0
파일: UI.cs 프로젝트: Yaroslavich/Scripts
 void Awake()
 {
     instance=this;
 }
예제 #5
0
        void Awake()
        {
            instance = (UI)target;

            EditorUtility.SetDirty(instance);
        }
예제 #6
0
        void Update()
        {
            if (UIControl.UseDragNDropMode() || !UIControl.UsePieMenuForBuild())
            {
                return;
            }

            if (buttonLayoutGroup.enabled == UIControl.UsePieMenuForBuild())
            {
                buttonLayoutGroup.enabled = !UIControl.UsePieMenuForBuild();
            }

            if (sInfo == null)
            {
                return;
            }

            Vector3        screenPos = Camera.main.WorldToScreenPoint(sInfo.GetPos()) * UI.GetScaleFactor();
            List <Vector3> posList   = GetPieMenuPos(sInfo.buildableList.Count, screenPos);

            for (int i = 0; i < posList.Count; i++)
            {
                buildButtons[i].rectT.localPosition = posList[i];
            }
        }
예제 #7
0
 public void OnSellButton()
 {
     currentTower.Sell();
     UI.ClearSelectedTower();
 }