コード例 #1
0
ファイル: IABehavior.cs プロジェクト: bergerbo/ggj2016
    public void startPraying(Ritual ritual)
    {
        currentRitual = ritual;

        if (ritual.GetType() == typeof(ActionSequence))
        {
            navMeshAgent.Stop();
            //IAtargetPosition.transform.position = character.transform.position;
            state = State.PRAY;
            actions = ((ActionSequence)ritual).actions;
            currentAction = 0;
        }
        else
        {
            var zone = (ZoneOrder)ritual;
            if (zone.isAllowed)
            {
                state = State.OBEY;
                getClosestSpecificArea((ZoneOrder)ritual);
            }
        }
    }
コード例 #2
0
ファイル: God.cs プロジェクト: bergerbo/ggj2016
    private void explainRitual(Ritual ritual)
    {
        if(ritual.GetType() == typeof(ActionSequence))
        {
            var seq = (ActionSequence)ritual;
			GameObject.Find ("Audio").GetComponent<Soundscript>().Play_sound ("Chant2");
            StartCoroutine(ExplainSequence(seq.actions, 0));
        } else
        {
            var zo = (ZoneOrder)ritual;
			GameObject.Find ("Audio").GetComponent<Soundscript>().Play_sound ("Chant1");
            StartCoroutine(ExplainZone(zo.zone, zo.isAllowed));
        }
        ritual.Explain();
    }