Exemple #1
0
 protected void ExitSceneAll(int lineno)
 {
     foreach (var ch in OnStage)
     {
         ch.OnStage = false;
     }
     OnStage.Clear();
 }
Exemple #2
0
        protected void ExitScene(int lineno, Character character)
        {
            if (!character.OnStage)
            {
                throw new RuntimeException(lineno, "{0}  is not on stage, and thus cannot exit!", character.Name);
            }

            OnStage.Remove(character);
            character.OnStage = false;
        }
Exemple #3
0
        protected void EnterScene(int lineno, Character character)
        {
            if (character.OnStage)
            {
                throw new RuntimeException(lineno, "{0} is already on stage, and thus cannot enter!", character.Name);
            }

            character.OnStage = true;
            OnStage.Add(character);
        }
Exemple #4
0
        protected void Activate(int lineno, Character character)
        {
            if (!character.OnStage)
            {
                throw new RuntimeException(lineno, "{0} is not on stage, and thus cannot speak!", character.Name);
            }

            /* If there are exactly two people on stage, the other one should be
             * second person */
            if (NumberOnStage == 2)
            {
                SecondPerson = OnStage.Single(ch => !ch.Equals(character));
            }
            else
            {
                SecondPerson = null;
            }

            FirstPerson = character;
        }