Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        printingCharacters = false;

        textDisplay      = textBox.GetComponent <TextMeshProUGUI>();
        characterManager = characterController.GetComponent <CharacterMangerScript>();
        speechSource     = audioSpeech.GetComponent <AudioSource>();

        //LoadTestSentenceSequenceFromFile();
        playerName = TextAssetToDialogueReader.characterName;
    }
    public void Start()
    {
        //set start positions
        foreach (Transform transform in shakeBack)
        {
            startPositions.Add(transform, transform.position);
        }
        //Get charManagerComponent
        charManagerComponent = charManagerObj.GetComponent <CharacterMangerScript>();


        InvokeRepeating("MoneyUpdate", 1, 1);
        //convert the screens raw into a dictioary
        foreach (GameObject obj in screensRaw)
        {
            screens.Add(obj.name, obj);
        }

        //set recipy book to good
        foreach (GameObject page in recipyPages)
        {
            page.SetActive(false);
        }
        recipyPages[recipyIndex].SetActive(true);

        //populate the recipys list
        Dictionary <Recipy.Ingredient, int> ingredients = new Dictionary <Recipy.Ingredient, int>();

        ingredients.Add(Recipy.Ingredient.MoonPotato, 1);
        ingredients.Add(Recipy.Ingredient.BlazerIce, 2);
        ingredients.Add(Recipy.Ingredient.CosmicLiqueur, 2);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.Moonshine, ingredients, 50));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.RedMoonberry, 2);
        ingredients.Add(Recipy.Ingredient.VoidOrange, 1);
        ingredients.Add(Recipy.Ingredient.BlazerIce, 1);
        ingredients.Add(Recipy.Ingredient.CosmicLiqueur, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.Bloodmoon, ingredients, 70));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.VoidOrange, 1);
        ingredients.Add(Recipy.Ingredient.RedMoonberry, 1);
        ingredients.Add(Recipy.Ingredient.SpaceLemon, 1);
        ingredients.Add(Recipy.Ingredient.BlazerIce, 1);
        ingredients.Add(Recipy.Ingredient.CosmicLiqueur, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.Fruitmoon, ingredients, 80));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.StarDirt, 2);
        ingredients.Add(Recipy.Ingredient.BlazerIce, 1);
        ingredients.Add(Recipy.Ingredient.CosmicLiqueur, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.Midnightmoon, ingredients, 50));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.CosmicLiqueur, 3);
        ingredients.Add(Recipy.Ingredient.ChemiBloom, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.SexOnTheMoon, ingredients, 30));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.CosmicLiqueur, 2);
        ingredients.Add(Recipy.Ingredient.BlazerIce, 2);
        ingredients.Add(Recipy.Ingredient.StarDirt, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.ShootingStar, ingredients, 50));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.StarDirt, 1);
        ingredients.Add(Recipy.Ingredient.VoidOrange, 2);
        ingredients.Add(Recipy.Ingredient.InfernalWine, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.VoidsRevenge, ingredients, 20));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.VoidOrange, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.VoidOrangeJuice, ingredients, 20));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.RedMoonberry, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.MoonberryJuice, ingredients, 20));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.CosmicLiqueur, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.ShotOfCosmicLiquer, ingredients, 0));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.InfernalWine, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.GlassFromTheUnderWorld, ingredients, 0));

        ingredients = new Dictionary <Recipy.Ingredient, int>();
        ingredients.Add(Recipy.Ingredient.BlazerIce, 1);
        drinkRecipys.Add(new Recipy(Recipy.DrinkName.WaterCyclone, ingredients, 20));

        //set teh prices for ingredients
        prices.Add(Recipy.Ingredient.MoonPotato, 3);
        prices.Add(Recipy.Ingredient.BlazerIce, 1);
        prices.Add(Recipy.Ingredient.RedMoonberry, 1);

        prices.Add(Recipy.Ingredient.VoidOrange, 2);
        prices.Add(Recipy.Ingredient.CosmicLiqueur, 3);

        prices.Add(Recipy.Ingredient.SpaceLemon, 2);
        prices.Add(Recipy.Ingredient.StarDirt, 10);

        prices.Add(Recipy.Ingredient.ChemiBloom, 3);
        prices.Add(Recipy.Ingredient.InfernalWine, 20);
    }
 // Start is called before the first frame update
 void Start()
 {
     charScript = charObj.GetComponent <CharacterMangerScript>();
 }