Exemplo n.º 1
0
 //从黑板上Actor数据的字典中获取Actor数据
 public Actor GetBlackBoardActor(string actorStr)
 {
     SM.BlackBoardActorData blackBoardActorData = mDicBlackActor[actorStr];
     SM.SceneRoom           room = SM.RandomRoomLevel.Singleton.LookupRoom(blackBoardActorData.roomID);
     if (null != room)
     {
         if (blackBoardActorData.mBlackActorType == BlackActorType.enNPC)
         {
             return(room.GetMonster(blackBoardActorData.actorID));
         }
         else if (blackBoardActorData.mBlackActorType == BlackActorType.enBox)
         {
             return(room.GetTreatureByID(blackBoardActorData.actorID));
         }
     }
     return(null);
 }
Exemplo n.º 2
0
 public override void Tick()
 {
     base.Tick();
     SM.SceneRoom room = SM.RandomRoomLevel.Singleton.LookupRoom(RoomId);
     if (null != room)
     {
         foreach (var boxId in BoxIdList)
         {
             Actor treasureActor = room.GetTreatureByID(boxId);
             mCurActor = treasureActor;
             if (treasureActor == null)
             {
                 IsEnabled = true;
                 return;
             }
             NPC tracsure = treasureActor as NPC;
             if (tracsure.IsDead)
             {
                 IsEnabled = true;
             }
         }
     }
 }