// Use this for initialization void Start() { _constants = GameObject.Find("ConstantsHolder").GetComponent <Constants> (); _references = GameObject.Find("ReferenceHolder").GetComponent <References> (); _register = GameObject.Find("UnitRegisterHolder").GetComponent <UnitRegister> (); _references.RegisterUI(this); UIState = Constants.UISTATE.Clear; }
public void SelectAttack() { ClearCommands(); UIState = Constants.UISTATE.Attack; }
public void SelectMove() { ClearCommands(); UIState = Constants.UISTATE.Move; }
//call when selecting a new unit or command to clear UIState, targets, etc. public void ClearCommands() { UIState = Constants.UISTATE.Clear; AttackTarget = null; }