示例#1
0
 private void Awake()
 {
     nPCMonitors = FindObjectsOfType <NPCMonitor>();
     if (SceneManager.GetActiveScene().name != "Tutorial")
     {
         string questKey             = PersistantGameManager.Instance.currentDialogueQuest.questKey;
         string firstTwoLettersOfKey = questKey[0].ToString() + questKey[1].ToString();
         foreach (NPCMonitor nPC in nPCMonitors)
         {
             string firstTwoLettersOfName = nPC.nameOfNpc[0].ToString() + nPC.nameOfNpc[1].ToString();
             if (firstTwoLettersOfKey == firstTwoLettersOfName)
             {
                 nPCMonitor = nPC;
                 break;
             }
         }
     }
 }
        private void process()
        {
            if (!create)
            {
                NPCMonitor.destroyAnimal(animalId);
                return;
            }

            FarmAnimal a = null;

            try
            {
                a = Util.deserialize <FarmAnimal>(animalStr);
            }
            catch (Exception e)
            {
                Log.error("Exception deserializing farm animal: " + e);
            }

            NPCMonitor.addAnimal(location, a);
            a.reload();
        }
示例#3
0
 private void process()
 {
     NPCMonitor.updateNPC(name, state);
 }
示例#4
0
 private void process()
 {
     NPCMonitor.updateAnimal(id, state);
 }