public GameObject getSelectBattleUnitLocaltionMaskGo() { if (_selectBattleUnitLocaltionMaskGo == null) { _selectBattleUnitLocaltionMaskGo = BMC.getPrefabsBehaviour().instantiatePrefab(PrefbasAssets.PrefabAssetsConstant.CLICKED_GROUND_MASK, true); } return(_selectBattleUnitLocaltionMaskGo); }
public void Start() { if (_maskGo == null) { _maskGo = BMC.getPrefabsBehaviour().instantiatePrefab(PrefbasAssets.PrefabAssetsConstant.CLICKED_GROUND_MASK, false); } BMC.getObserverBehaviour().registerMsg(this); BMC.getObserverBehaviour().publisheMsg(ObserverMsgTypeEnum.BEHAVIOUR_MACHINE_GLOBALBLACKBOARD_FINISHED, this); }
protected void showLocaltionMask(Vector3 position) { if (_locationMaskGo == null) { _locationMaskGo = BMC.getPrefabsBehaviour().instantiatePrefab(PrefbasAssets.PrefabAssetsConstant.CLICKED_GROUND_MASK, true); } if (!_locationMaskGo.activeSelf) { _locationMaskGo.SetActive(true); } _locationMaskGo.transform.position = position; }
protected override void actionStart() { // 设置默认可以控制的 unit playerInfoBB.setCurrLeadGo(defaultSelectLeadUnit); //// 设置主摄像机 跟随的 unit //CameraPointVo mainCameraPointVo = defaultMainCameraPoint.GetComponent<CameraPointVo>(); //mainCameraPointVo.setFollowerTarget( defaultSelectLeadUnit ); //mainCameraPointVo.initDefaultCameraPoint(); //mainCameraPointVo.cameraFollowTarget(); //// [保存]住摄像机 机位对象 //playerInfoBB.setMainCameraPointVo( mainCameraPointVo ); // [保存]点击地板后的特效 GameObject clickedFloorAnimGo = BMC.getPrefabsBehaviour().instantiatePrefab(PrefbasAssets.PrefabAssetsConstant.CLICKED_GROUND_MASK, true); playerInfoBB.setClickedFloorAnimGo(clickedFloorAnimGo); // [保存]选择一个可控制单位的特效 或 高亮什么的 GameObject currSelectLeadAnimGo = BMC.getPrefabsBehaviour().instantiatePrefab(PrefbasAssets.PrefabAssetsConstant.CLICKED_GROUND_MASK, true); playerInfoBB.setCurrSelectLeadAnimGo(currSelectLeadAnimGo); }
public void Start() { BMC.getObserverBehaviour().registerMsg(this); RectTransform canvasRt = uiCanvas.GetComponent <RectTransform>(); Array uiLayerEnumArr = Enum.GetValues(typeof(UIConstant.UILayerType)); // ? 这个类 需要自动生成 PrefbasAssets.PrefabAssetsConstant uiEmptyContainer = PrefbasAssets.PrefabAssetsConstant.UI_EMPTY_CONTAINER; foreach (UIConstant.UILayerType item in uiLayerEnumArr) { GameObject windowContainer = BMC.getPrefabsBehaviour().instantiatePrefab(uiEmptyContainer, true); RectTransform windowRectTransfrom = windowContainer.GetComponent <RectTransform>(); windowRectTransfrom.name = item.ToString(); windowRectTransfrom.SetParent(canvasRt); string emptyContainerPrefabPath = BMC.getPrefabsBehaviour().getPrefabPath(uiEmptyContainer); windowContainer.AddComponent <RectTransfromResetComponent>().reSetRectTransformInfo(emptyContainerPrefabPath); _layerContainerMapping[item] = windowContainer; } }