Esempio n. 1
0
    private void QuestCheck(NpcBehavior npc)
    {
        questReq -= 1;

        if (questReq <= 0)
        {
            isQuesting = false;

            if (questPoint <= 1)
            {
                roomLevel = 5;
                if (OnQuestFail != null) //cheat
                {
                    OnQuestFail(this);
                }
            }

            if (questPoint >= 2)
            {
                roomLevel += 1;
                Debug.Log("Room Level = " + roomLevel);
                if (OnRoomLevelUp != null)
                {
                    OnRoomLevelUp(this);
                }

                if (OnQuestSuccess != null)
                {
                    OnQuestSuccess(this);
                }
            }

            //we can add more parameter changes here
        }
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     healthBarLength = Screen.width / 6;
     rigidbody2D     = GetComponent <Rigidbody2D>();
     arena           = GameObject.Find("ArenaWall");
     npcBehavior     = GetComponent <NpcBehavior>();
 }
Esempio n. 3
0
        private NpcBehavior GetBehavior()
        {
            if (Configuration.BehaviorType == NpcBehaviorType.Aggressive && Presence is DynamicPresence)
            {
                // hogy ne tamadjanak be mindenkit rogton
                return(NpcBehavior.Create(NpcBehaviorType.Neutral));
            }

            return(NpcBehavior.Create(Configuration.BehaviorType));
        }
 private void DisableMovement(NpcBehavior npc)
 {
     playerMode = PlayerMode.talking;
     //Debug.Log(gameObject.name + " Read notif from the NPC, CONTROL DISABLED");
     input.enabled = false;
 }
Esempio n. 5
0
 public void TriggerDialogue(NpcBehavior npc)//Zak added this parameter! check your trigger button!
 {
     //Debug.Log("Notified from NPC" + thisNPC.name); //Zak also added this
     FindObjectOfType <DialogueManager>().StartDialogue(dialogue);
 }
Esempio n. 6
0
 void Start()
 {
     target = GameObject.Find("Admin Controller");
     Debug.Log(transform.parent);
     behavior = transform.parent.gameObject.GetComponent("NpcBehavior") as NpcBehavior;
 }