Example #1
0
        /*
         *
         *  switch (actorInfo.ActorType)
         *  {
         *      case PActorType.Player:
         *
         *          break;
         *      case PActorType.Npc:
         *          break;
         *      case PActorType.Pet:
         *          break;
         *  }*/

        public PlayerActor CreateActor(PPlayerActorInfo actorInfo)
        {
            /*
             * load actor prefab res
             */
            return(null);
        }
Example #2
0
        void NotifyRoleEnterWorld(ClientHandler clientHandler)
        {
            var role = clientHandler.Role;

            var enterWorldNotify = new PRoleEnterWorldNotify();
            var actorInfo        = new PPlayerActorInfo();

            actorInfo.ActorId   = role.id;
            actorInfo.ActorName = clientHandler.Role.name;

            actorInfo.ActorData = DBToPUtil.DRoleDataToP(PlayerDB.Instance.GetRoleData(role.id));

            var actorInfoPos = new PVector3Int();

            actorInfoPos.X = clientHandler.Role.lastPosX;
            actorInfoPos.Z = clientHandler.Role.lastPosY;
            actorInfo.Pos  = actorInfoPos;

            actorInfo.Job   = (PJobType)role.job_type;
            actorInfo.Level = role.level;

            enterWorldNotify.PlayerActor = actorInfo;
            clientHandler.Send(enterWorldNotify);

            //scene and level
            var changeLevelNotify = new PChangeLevelNotify();

            changeLevelNotify.LevelId = clientHandler.Role.lastLevelId;
            clientHandler.Send(changeLevelNotify);
        }
Example #3
0
 public void Init(PPlayerActorInfo actorInfo)
 {
     mActorInfo = actorInfo;
 }