GetActorName() public method

public GetActorName ( int index ) : string
index int
return string
Esempio n. 1
0
    public override void Execute(GameEvent gameEvent)
    {
        string nm = "";
        SpeakerPortrait sp = null;
        if(this.show3)
        {
            nm = gameEvent.GetActorName(this.actorID);
        }
        else
        {
            nm = "";
        }

        int lang = GameHandler.GetLanguage();
        string msg = "";
        if(lang < this.message.Length)
        {
            msg = this.message[lang];
        }
        else
        {
            msg = this.message[0];
        }

        string[] ch = new string[0];
        this.dummyNext = new int[0];
        for(int i=0; i<this.choice.Count; i++)
        {
            if(!this.addVariableCondition[i] || this.variableCondition[i].CheckVariables())
            {
                ch = ArrayHelper.Add(this.GetChoiceText(i, lang), ch);
                this.dummyNext = ArrayHelper.Add(this.choiceNext[i], this.dummyNext);
            }
        }

        if(this.show4)
        {
            sp = new SpeakerPortrait(this.scene, this.v2, this.show5);
        }

        GameHandler.GetLevelHandler().ShowChoice(nm, msg, ch, this.number, gameEvent, sp);
    }
Esempio n. 2
0
    public override void Execute(GameEvent gameEvent)
    {
        int[] ids = DataHolder.Teleports().GetTeleportIDs(this.show7);

        if(ids.Length == 0)
        {
            gameEvent.StepFinished(this.nextFail);
        }
        else
        {
            string[] ch = DataHolder.Teleports().GetNamesForIDs(ids);

            int lang = GameHandler.GetLanguage();
            if(this.show6)
            {
                ids = ArrayHelper.Add(this.choiceNext[0], ids);

                if(lang < ((string[])this.choice[0]).Length)
                {
                    ch = ArrayHelper.Add(((string[])this.choice[0])[lang], ch);
                }
                else
                {
                    ch = ArrayHelper.Add(((string[])this.choice[0])[0], ch);
                }
            }
            gameEvent.SetTeleportIDs(ids, this.show6);

            string nm = "";
            SpeakerPortrait sp = null;
            if(this.show3)
            {
                nm = gameEvent.GetActorName(this.actorID);
            }
            else
            {
                nm = "";
            }

            string msg = "";
            if(lang < this.message.Length)
            {
                msg = this.message[lang];
            }
            else
            {
                msg = this.message[0];
            }

            if(this.show4)
            {
                sp = new SpeakerPortrait(this.scene, this.v2, this.show5);
            }

            this.dummyNext = new int[ids.Length];
            for(int i=0; i<this.dummyNext.Length; i++) this.dummyNext[i] = i;
            GameHandler.GetLevelHandler().ShowChoice(nm, msg, ch, this.number, gameEvent, sp);
        }
    }
Esempio n. 3
0
    public override void Execute(GameEvent gameEvent)
    {
        string nm = "";
        SpeakerPortrait sp = null;
        if(this.show3)
        {
            nm = gameEvent.GetActorName(this.actorID);
        }
        else
        {
            nm = "";
        }

        string msg = "";
        if(GameHandler.GetLanguage() < this.message.Length)
        {
            msg = this.message[GameHandler.GetLanguage()];
        }
        else
        {
            msg = this.message[0];
        }
        if(this.show4)
        {
            sp = new SpeakerPortrait(this.scene, this.v2, this.show5);
        }

        GameHandler.GetLevelHandler().ShowDialogue(nm, msg, this.number,
                gameEvent, this.next, this.show, this.time, this.show2, sp);
    }