public void Start() { List <GameObject> goLst = new List <GameObject>(); List <PlayerConstant.PlayerControlerType> pctLst = new List <PlayerConstant.PlayerControlerType>(); // ===================== test =============================== _unitsGameObjArr = GameObject.FindGameObjectsWithTag("tag_testPlayers"); _mainPlayer = GameObject.FindGameObjectWithTag("Player"); foreach (GameObject item in _unitsGameObjArr) { goLst.Add(item); pctLst.Add(PlayerConstant.PlayerControlerType.FOLLOWER); } goLst.Add(_mainPlayer); pctLst.Add(PlayerConstant.PlayerControlerType.PROTAGONIST); BMC.registerInitCompleteBehaviourManager(BehaviourManagerType.PLAYER_MOVEMENT, this); BMC.getObserverBehaviour().publisheMsg(ObserverMsgTypeEnum.PLAYER_CONTROLER_CHANGED, new object[] { goLst, pctLst }); BMC.getObserverBehaviour().publisheMsg(ObserverMsgTypeEnum.PLAYER_FOLLOW_TARGET_CHANGED, _mainPlayer); BMC.getObserverBehaviour().registerMsg(this); // ===================== test =============================== }
public void Start() { _gameConfigTxtAssetsArr = Resources.LoadAll <TextAsset>("Configs"); for (int i = 0; i < _gameConfigTxtAssetsArr.Length; i++) { TextAsset ta = _gameConfigTxtAssetsArr[i]; string txtAssetsName = ta.name; if (txtAssetsName == "GameConfig") { this.parseGameConfigXML(ta); } _gameConfigTxtAssetsArr[i] = null; } BMC.registerInitCompleteBehaviourManager(BehaviourManagerType.GAME_CONFIG, this); BMC.getObserverBehaviour().publisheMsg(ObserverMsgTypeEnum.BEHAVIOUR_MACHINE_GLOBALBLACKBOARD_FINISHED, this); }
public void Start() { BMC.registerInitCompleteBehaviourManager(BehaviourManagerType.OB_SERVER, this); StartCoroutine("coroutinePublisheMsg"); }
public void Start() { BMC.registerInitCompleteBehaviourManager(BehaviourManagerType.INPUT_MOUSE, this); BMC.getObserverBehaviour().publisheMsg(ObserverMsgTypeEnum.BEHAVIOUR_MACHINE_GLOBALBLACKBOARD_FINISHED, this); }
private void connectionServer() { BMC.registerInitCompleteBehaviourManager(BehaviourManagerType.GAME_SERVER, this); BMC.getObserverBehaviour().publisheMsg(ObserverMsgTypeEnum.BEHAVIOUR_MACHINE_GLOBALBLACKBOARD_FINISHED, this); }