//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); } }
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; }
//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); }
//reset the awaiting task type: public void ResetAwaitingTaskType() { AwaitingTaskType = TaskManager.TaskTypes.Null; Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); }
void Awake() { AwaitingTaskType = TaskManager.TaskTypes.Null; }