Пример #1
0
 private void moveCh(ActorChHobit actorCh)
 {
     if (actorCh.FrameFlag == true)
     {
         actorCh.SetStateMove(new Vector3(actorCh.BaseMtx.M31, actorCh.BaseMtx.M32, actorCh.BaseMtx.M33),
                              moveSpeed, actorCh.AiMoveRot, false);
     }
     else
     {
         actorCh.SetStateMove(new Vector3(actorCh.BaseMtx.M31, actorCh.BaseMtx.M32, actorCh.BaseMtx.M33),
                              0, actorCh.AiMoveRot, false);
     }
 }
Пример #2
0
        private bool frameEat(ActorChHobit actorCh)
        {
            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            if (actorCh.GetStateId() != ActorChBase.StateId.Eat)
            {
                actorCh.AiMoveCount--;
                if (actorCh.AiMoveCount < 0)
                {
                    actorCh.AiMoveRot   = (int)StaticDataList.getRandom(360);
                    actorCh.AiMoveCount = (int)(Data.SetupValue.CharMoveChangeTime + StaticDataList.getRandom(-(int)(Data.SetupValue.CharMoveChangeRandTime), (int)Data.SetupValue.CharMoveChangeRandTime));
                }
                actorCh.SetStateMove(new Vector3(actorCh.BaseMtx.M31, actorCh.BaseMtx.M32, actorCh.BaseMtx.M33),
                                     moveSpeed, actorCh.AiMoveRot, false);
            }
            return(true);
        }
Пример #3
0
 private void moveCh(ActorChHobit actorCh)
 {
     if(actorCh.FrameFlag == true){
     actorCh.SetStateMove( new Vector3( actorCh.BaseMtx.M31,actorCh.BaseMtx.M32,actorCh.BaseMtx.M33 ),
                          moveSpeed, actorCh.AiMoveRot, false );
     }else{
     actorCh.SetStateMove( new Vector3( actorCh.BaseMtx.M31,actorCh.BaseMtx.M32,actorCh.BaseMtx.M33 ),
                          0, actorCh.AiMoveRot, false );
     }
 }
Пример #4
0
 private bool frameEat(ActorChHobit actorCh)
 {
     GameCtrlManager            ctrlResMgr    = GameCtrlManager.GetInstance();
     if(actorCh.GetStateId() != ActorChBase.StateId.Eat){
     actorCh.AiMoveCount--;
     if(actorCh.AiMoveCount < 0){
         actorCh.AiMoveRot = (int)StaticDataList.getRandom(360);
         actorCh.AiMoveCount = (int)(Data.SetupValue.CharMoveChangeTime + StaticDataList.getRandom(-(int)(Data.SetupValue.CharMoveChangeRandTime),(int)Data.SetupValue.CharMoveChangeRandTime));
     }
     actorCh.SetStateMove( new Vector3( actorCh.BaseMtx.M31,actorCh.BaseMtx.M32,actorCh.BaseMtx.M33 ),
        		                          moveSpeed, actorCh.AiMoveRot, false );
     }
     return true;
 }