Пример #1
0
 public void GameOver(Endings GameStatus)
 {
     //被麻麻发现
     if (gameover == true)
     {
         return;
     }
     gameover       = true;
     Time.timeScale = 0;
     AudioManager.Instance.EndAudioPlay(GameStatus);
     EndingPanels[(int)GameStatus].SetActive(true);
 }
Пример #2
0
        public override void UpdateGeometry()
        {
            base.UpdateGeometry();
            var ending = new Triangle
            {
                Translation = new Vector(ConnectorStrategy.ConnectionEnd.X, ConnectorStrategy.ConnectionEnd.Y),
                Rotation    = ConnectorStrategy.EndAngle,
                IsFilled    = true
            };
            var geometry = Geometry as GeometryGroup;

            Endings.Clear();
            Endings.Add(ending);
        }
Пример #3
0
        public static void Reset()
        {
            kills             = 0;
            ressurections     = 0;
            totalEnergyGained = 0;
            totalEnergySpent  = 0;
            buildingsBuilt    = 0;
            ending            = Endings.Passive;

            endingsReached = new Dictionary <Endings, int>()
            {
                { Endings.Death, 0 },
                { Endings.God, 0 },
                { Endings.Passive, 0 }
            };
        }
Пример #4
0
    private void Start()
    {
        // The below code is for allowing the user to select a scenario file instead of defaulting to Scenarios.json
        //string[] scenarioArray = Directory.GetFiles("Assets/Resources/Scenarios", "*.json");
        //List<string> scenarioListTrimmed = new List<string>();
        //for (int i = 0; i < scenarioArray.Length; ++i)
        //{
        //    scenarioListTrimmed.Add(Path.GetFileNameWithoutExtension(scenarioArray[i]));
        //}

        // Default the game to loading "Scenarios.json"
        scenarioFiles = new string[] { "Scenarios" };

        // The below code is for allowing the user to select a scenario file instead of defaulting to Scenarios.json
        //scenarioFiles = scenarioListTrimmed.ToArray();
        //scenarioListTrimmed.Insert(0, "Random");
        //scenarioSelect.AddOptions(scenarioListTrimmed);
        // Load the endings from endings.json
        TextAsset endingsData = Resources.Load("Endings/endings") as TextAsset;

        endings = JsonUtility.FromJson <Endings>(endingsData.text);
    }
Пример #5
0
 private Present(VerbPrincipalParts parts, Endings endings = Endings.Am)
 {
     _stem = string.Format("{0}{1}", parts.Present.TruncateEnding("o"), endings == Endings.Em ? "e" : "a");
 }
Пример #6
0
        static string conjugateRegularVerb(string infinitive, PersonalPronoun pronoun, Conjugation conjugation)
        {
            string conjugatedVerb;
            string newStem;
            string conjugatedEnding = null;

            // set up defaults
            string model = infinitive;
            string stem  = model.Substring(0, model.Length - 2); // may get overwritten

            switch (conjugation)
            {
            case Conjugation.SubjunctivePresent:
                // the "tenho" case
                // keep the model, get the stem
                stem = FirstPersonIndicativeStem(infinitive);
                break;

            case Conjugation.SubjunctiveFuture:
            case Conjugation.SubjunctiveImperfect:
                // the "comeram" case again
                // suggest a whole new model and create a stem for it
                model = ThirdPersonPluralPreteriteModel(infinitive);
                stem  = model.Substring(0, model.Length - 2);
                break;
            }

            char ending = model[model.Length - 2];

            Tense   t = Tenses.Find(o => o.conjugation == conjugation);
            Endings e = t.endings.Find(o => o.letter == ending);

            string[] endings = e.endings;

            switch (pronoun.person)
            {
            case Person.firstPersonSingular:
                conjugatedEnding = endings[0];
                break;

            case Person.thirdPersonSingular:
                conjugatedEnding = endings[1];
                break;

            case Person.firstPersonPlural:
                conjugatedEnding = endings[2];
                break;

            case Person.thirdPersonPlural:
                conjugatedEnding = endings[3];
                break;
            }

            switch (conjugation)
            {
            case Conjugation.SubjunctivePresent:
                if (!isIrregular(infinitive, Conjugation.Present))
                {
                    stem = orthoChanging2(infinitive, conjugatedEnding);
                }
                break;

            case Conjugation.SubjunctiveFuture:
            case Conjugation.SubjunctiveImperfect:
                if (!isIrregular(infinitive, Conjugation.Preterite))
                {
                    stem = orthoChanging2(infinitive, conjugatedEnding);
                }
                break;

            default:
                stem = orthoChanging2(infinitive, conjugatedEnding);
                break;
            }



            conjugatedVerb = stem + conjugatedEnding;
            return(conjugatedVerb);
        }
Пример #7
0
        static string conjugateRegularVerb(string infinitive, PersonalPronoun pronoun, Conjugation conjugation)
        {
            char   ending           = infinitive[infinitive.Length - 2];
            string stem             = infinitive.Substring(0, infinitive.Length - 2);
            string conjugatedEnding = null;
            string conjugatedVerb;

            Tense   t = Tenses.Find(o => o.conjugation == conjugation);
            Endings e = t.endings.Find(o => o.letter == ending);

            string[] endings = e.endings;

            switch (pronoun.person)
            {
            case Person.firstPersonSingular:
                conjugatedEnding = endings[0];
                break;

            case Person.thirdPersonSingular:
                conjugatedEnding = endings[1];
                break;

            case Person.firstPersonPlural:
                conjugatedEnding = endings[2];
                break;

            case Person.thirdPersonPlural:
                conjugatedEnding = endings[3];
                break;
            }


            string newStem;

            switch (conjugation)
            {
            case Conjugation.SubjunctivePresent:
                newStem = FirstPersonIndicativeStem(infinitive);
                // todo: double-check the 1st-person present indicative irregulars
                //       to ensure that none that need to be checked
                //       get skipped for the ortho change.
                if (!isIrregular(infinitive, Conjugation.Present))
                {
                    newStem = orthoChanging2(infinitive, conjugatedEnding);
                }
                break;

            case Conjugation.SubjunctiveFuture:
                newStem = ThirdPersonPluralPreteriteStem(infinitive);
                // todo: double-check the 1st-person present indicative irregulars
                //       to ensure that none that need to be checked
                //       get skipped for the ortho change.
                if (!isIrregular(infinitive, Conjugation.Preterite))
                {
                    newStem = orthoChanging2(infinitive, conjugatedEnding);
                }
                break;

            case Conjugation.SubjunctiveImperfect:
                newStem = ThirdPersonPluralPreteriteStem(infinitive);
                // todo: double-check the 1st-person present indicative irregulars
                //       to ensure that none that need to be checked
                //       get skipped for the ortho change.
                if (!isIrregular(infinitive, Conjugation.Preterite))
                {
                    newStem = orthoChanging2(infinitive, conjugatedEnding);
                }
                break;

            default:
                newStem = orthoChanging2(infinitive, conjugatedEnding);
                break;
            }

            conjugatedVerb = newStem + conjugatedEnding;
            return(conjugatedVerb);
        }
Пример #8
0
 private Future(string stem, Endings endings)
 {
     _endings = endings;
       _stem = stem;
 }
Пример #9
0
 public void EndAudioPlay(Endings ending)
 {
     EndGamesSource.clip = EndGamesClip[(int)ending];
     EndGamesSource.Play();
 }
Пример #10
0
 //result for exit command
 public static void PrintExit()
 {
     Endings.CowardExit();
 }