void OnTriggerExit(Collider other) { ActionController ac = ActionControllerManager.Instance.GetACByCollider(other); if (ac != null) { if (_townUI == null && UIManager.Instance != null) { GameObject ui = UIManager.Instance.GetUI("TownHome"); if (ui != null) { _townUI = ui.GetComponent <TownHUD>(); } } if (_townUI != null && ac.IsPlayerSelf) { //_townUI.SetContextIcon(null, ""); #if OUTLINE_ENABLED _parent.gameObject.layer = FC_CONST.LAYER_DEFAULT; #elif OUTLINE_SIMPLE_ENABLED _parent.gameObject.SendMessage("OnRevertOriginalShader", SendMessageOptions.DontRequireReceiver); #endif } _fastCommand._param1 = _parent; _fastCommand._cmd = FCCommand.CMD.ACTION_IS_AWAY_NPC; CommandManager.Instance.SendFast(ref _fastCommand, ac); } }
void OnTriggerEnter(Collider other) { ActionController ac = ActionControllerManager.Instance.GetACByCollider(other); if (ac != null) { if (_townUI == null && UIManager.Instance != null) { GameObject ui = UIManager.Instance.GetUI("TownHome"); if (ui != null) { _townUI = ui.GetComponent <TownHUD>(); } } if (_townUI != null && ac.IsPlayerSelf) { //_townUI.SetContextIcon(_targetButtonName, _functionName); #if OUTLINE_ENABLED _parent.gameObject.layer = FC_CONST.LAYER_TRIGGER; #elif OUTLINE_SIMPLE_ENABLED _parent.gameObject.SendMessage("OnReplaceByOutlineShader", SendMessageOptions.DontRequireReceiver); #endif } _fastCommand._param1 = _parent; _fastCommand._cmd = FCCommand.CMD.ACTION_IS_NEAR_NPC; CommandManager.Instance.SendFast(ref _fastCommand, ac); } }
void OnClose() { UIManager.Instance.CloseUI("UIMonthCard"); TownHUD townHome = transform.parent.FindChild("TownHome").GetComponent <TownHUD>(); if (townHome != null) { //townHome.SetNewBgAndNewNumber(); } }
public void InitTownCompoment(TownHUD townHome) { isInTutorial = false; _needSaveFlag = false; uITownHome = townHome; }
void Awake() { _instance = this; }
void Awake() { _uiTownHome = transform.parent.FindChild("TownHome").GetComponent <TownHUD>(); _grid = gridGO.GetComponent <UIGrid>(); }