Пример #1
0
    // This is for all the choices the user can pick, all choices need to be added to this array and removed once the
    //	user has picked.
    // DialogueBox[] queuedDialogueBoxes;

    public void CreateNewLife()
    {
        Destroy(Mother);
        Mother = null;

        Destroy(Father);
        Father = null;

        Destroy(Player);
        Player = null;

        Destroy(Spouse);

        Mother            = gameObject.AddComponent <Parent> ();
        Mother.ParentType = ParentType.MOTHER;
        Mother.FirstName  = "Mother";
        Mother.LastName   = "Parent";
        Mother.Create();

        Father            = gameObject.AddComponent <Parent> ();
        Father.ParentType = ParentType.FATHER;
        Father.FirstName  = "Father";
        Father.LastName   = "Parent";
        Father.Create();

        // TODO: Try and remember the word instead of lifetime.
        Mother.CurrentVaccines.Add(new Vaccination("Lifetime? Immunity", "All Vaccines", -1, 5000));
        Father.CurrentVaccines = Mother.CurrentVaccines;

        // For testing purposes.
        Mother.Intellect = Father.Intellect = 100f;

        Player           = gameObject.AddComponent <Player> ();
        Player.FirstName = "Player";
        Player.LastName  = "LastName";
        Player.Create();

        // Testing the Housing information, I require a multiplier of 1.
        // Player.Nationality = new Nationality ("ENG", "England", "English", "British Pound", "£", "", 1f);

        // Canvas.ForceUpdateCanvases();
        scrollViewRect.verticalNormalizedPosition = 0f;
        Canvas.ForceUpdateCanvases();

        PostToOutput();
    }