예제 #1
0
 public void Awakening(int itemID)
 {
     if (stoneToUse.itemID == itemID)
     {
         SpriteRenderer sr = this.gameObject.GetComponent <SpriteRenderer>();
         sr.sprite = spriteToLoad;
         if (animatorToEnable != null)
         {
             animatorToEnable.enabled = true;
         }
         awakeningStatus = AwakeningStatus.is_awake;
         NPCManager.npcManager.UpdateNPCList(ID, awakeningStatus);
         GameEvents.OnAwakenEvent(this.gameObject.tag);
         GameManager.gm.SetInventoryActive(false);
         CharacterSheet.charSheet.ChangeSpiritKarma(posKarmaAwarded);
         DisplayDialog();
     }
 }
예제 #2
0
 private void Awake()
 {
     if (NPCManager.npcManager.HasNPC(ID))
     {
         NPCManager.NPCCharacter thisNPC = NPCManager.npcManager.GetNPC(ID);
         questToken.SetActive(thisNPC.hasQuest);
         questToken.GetComponentInChildren <QuestGiver>().questToGive = thisNPC.currentQuest;
         if (thisNPC.currentQuest != null)
         {
             questToken.GetComponentInChildren <QuestGiver>().questType = thisNPC.currentQuest.questType;
         }
         talkNotifier.SetActive(thisNPC.haveSpoken);
         awakeningStatus = thisNPC.status;
         if (thisNPC.status == AwakeningStatus.is_awake)
         {
             this.gameObject.GetComponent <SpriteRenderer>().sprite = spriteToLoad;
         }
     }
 }