public void Start() { gameConfigVo = BMC.getGameConfigBehaviour().gameConfigVo; gameLayerByMovement = NavMesh.GetAreaFromName(gameConfigVo.gameLayer_unit_movement); playerRigidbody = GetComponent <Rigidbody>(); absStart(); }
// ========================= AIMovement ========================= //protected override PlayerMovementDescribeVo absCreatePlayerDescribeVo() //{ // PlayerMovementDescribeVo pmd = new PlayerMovementDescribeVo(); // pmd.isAddClickGroundMask = true; // pmd.playerControlerType = PlayerConstant.PlayerControlerType.INCONTROLLABLE; // return pmd; //} //protected override void absClickGroundMaskAddComplete( GameObject _maskGo ) //{ // _maskGo.SetActive( false ); //} protected override void absStart() { _gameConfigVo = BMC.getGameConfigBehaviour().gameConfigVo; _ani = GetComponent <Animator>(); _ani.applyRootMotion = true; _ani.updateMode = AnimatorUpdateMode.Normal; _ani.cullingMode = AnimatorCullingMode.AlwaysAnimate; playerRigidbody.useGravity = true; playerRigidbody.isKinematic = false; playerRigidbody.detectCollisions = !playerRigidbody.isKinematic; playerRigidbody.interpolation = RigidbodyInterpolation.Interpolate; playerRigidbody.collisionDetectionMode = CollisionDetectionMode.Discrete; playerRigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ | RigidbodyConstraints.FreezePositionY; // 构建一个lookAt朝向定位球 最后一个路径 朝向有点小偏差 _lookAtPositionDeviceGo = new GameObject(); _lookAtPositionDeviceGo.name = "[朝向]定位球"; BMC.getObserverBehaviour().registerMsg(this); }
public void Start() { _gameConfigVo = BMC.getGameConfigBehaviour().gameConfigVo; sendFsmEvent(FSMEventsBlackBoard.FSM_DEFAULT_SETTING); BMC.getObserverBehaviour().registerMsg(this); }
protected override void actionAwake() { _gameConfigVo = BMC.getGameConfigBehaviour().gameConfigVo; _gameClickInputLayerMask = LayerMask.GetMask(_gameConfigVo.gameLayer_clickInput); _mainCamera = getMaincamera(); }