コード例 #1
0
    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);
        }
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
    void OnClose()
    {
        UIManager.Instance.CloseUI("UIMonthCard");

        TownHUD townHome = transform.parent.FindChild("TownHome").GetComponent <TownHUD>();

        if (townHome != null)
        {
            //townHome.SetNewBgAndNewNumber();
        }
    }
コード例 #4
0
 public void InitTownCompoment(TownHUD townHome)
 {
     isInTutorial  = false;
     _needSaveFlag = false;
     uITownHome    = townHome;
 }
コード例 #5
0
 void Awake()
 {
     _instance = this;
 }
コード例 #6
0
    void Awake()
    {
        _uiTownHome = transform.parent.FindChild("TownHome").GetComponent <TownHUD>();

        _grid = gridGO.GetComponent <UIGrid>();
    }