예제 #1
0
    // Update is called once per frame
    void Update()
    {
        //Each frame the current state is executed and if a state transition is triggered
        //in the execution of the state the state is changed
        currentState     = currentState.DoState();
        currentStateName = currentState.ToString();

        animateWalking();
    }
예제 #2
0
    private void SelectNPC(uint npcId)
    {
        currentNpc = GlobalData.resourcesManager.getById <NPCState> (npcId);
        if (currentNpc == null)
        {
            Debug.LogWarning("Current dialog npc is null!");
            return;
        }
        Debug.Log("NPC selected: " + currentNpc.ToString());

        npcNameText.text = currentNpc.getName();
    }
예제 #3
0
        public override string GetDebugInfo()
        {
            var script = shouldExecScript ? dialogueScript : "nothing";

            return($"{npcName}\n talks: {talks.ToString()}\n execs: {script}\n state: {state.ToString()}");
        }