예제 #1
0
 public override void Die()
 {
     base.Die();
     ActivateLayer("DeathLayer");
     myAnimator.SetBool("Die", dead);
     GameManager.Instance.EnemyOnDaed(this);
     Player.Instance.AddExp(EXPManager.CalculateEXP(this));
     gameObject.layer = LayerMask.NameToLayer("Interactable");
 }
예제 #2
0
    public void CompleteQuest()
    {
        if (selectedQuest.IsComplete)
        {
            foreach (CollectObjective collectObjective in selectedQuest.CollectObjectives)
            {
                Inventory.Instance.itemCountChangedEvent -= collectObjective.UpdateItemCount;
                collectObjective.Complete();
            }

            foreach (KillObjective collectObjective in selectedQuest.KillObjectives)
            {
                GameManager.Instance.EnemyOnDeadEvent -= collectObjective.UpdateKillCount;
            }

            Player.Instance.AddExp(EXPManager.CalculateEXP(selectedQuest));

            selectedQuestGiver.CompleteQuest(selectedQuest);

            Questlog.Instance.RemoveQuest(selectedQuest);

            Back();
        }
    }