示例#1
0
 //Component Tasks:
 public void SetAwaitingTaskType(TaskManager.TaskTypes TaskType, Sprite Sprite)
 {
     AwaitingTaskType = TaskType;                      //set the new task type
     if (ChangeMouseTexture == true && Sprite != null) //if it is allowed to change the mouse texture
     //change it:
     {
         Cursor.SetCursor(Sprite.texture, Vector2.zero, CursorMode.Auto);
     }
 }
示例#2
0
        public FactionUnitUpradesVars[] FactionUnitUpgrades;         //each faction has a slot in this list

        void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            else if (Instance != this)
            {
                Destroy(gameObject);
            }

            AwaitingTaskType = TaskManager.TaskTypes.Null;
        }
示例#3
0
        //this method gets the building task and returns what it means in the task manager.
        public static TaskManager.TaskTypes BuildingTaskType(Building.BuildingTasks Task)
        {
            TaskManager.TaskTypes Result = TaskManager.TaskTypes.CreateUnit;

            switch (Task)
            {
            case Building.BuildingTasks.Destroy:
                Result = TaskManager.TaskTypes.DestroyBuilding;
                break;

            case Building.BuildingTasks.Research:
                Result = TaskManager.TaskTypes.Research;
                break;

            case Building.BuildingTasks.CreateUnit:
                Result = TaskManager.TaskTypes.CreateUnit;
                break;
            }

            return(Result);
        }
示例#4
0
 //reset the awaiting task type:
 public void ResetAwaitingTaskType()
 {
     AwaitingTaskType = TaskManager.TaskTypes.Null;
     Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
 }
示例#5
0
 void Awake()
 {
     AwaitingTaskType = TaskManager.TaskTypes.Null;
 }