Exemple #1
0
        public void CreateNPC(NPCConfig config)
        {
            Room room = Entity as Room;

            if (config.RoadSettingId != room.info.RoadSettingId)
            {
                return;
            }

            NPC npc = new NPC(this, config);

            _npcDicts.Add(config.Id, npc);
            _npcs.Add(npc);
        }
Exemple #2
0
 public void SetData(NPCConfig config)
 {
     Id            = config.Id;
     Enable        = config.Enable;
     RoadSettingId = config.RoadSettingId;
     Name          = config.Name;
     Location      = config.Location;
     CharacterId   = config.CharacterId;
     BicycleId     = config.BicycleId;
     BodyId        = config.BodyId;
     DecorationId  = config.DecorationId;
     MinSpeed      = config.MinSpeed;
     MaxSpeed      = config.MaxSpeed;
     RideTime      = config.RideTime;
     RestTime      = config.RestTime;
 }
Exemple #3
0
 public NPC(RoomNpcComponent roomNPCComponent, NPCConfig config)
 {
     _roomNPCComponent = roomNPCComponent;
     _data.SetData(config);
 }