Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        animator = this.GetComponentInChildren <Animator>();
        promt    = FindObjectOfType <PromptControl>();
        pancake  = GameObject.FindGameObjectWithTag("Minigame4Pancake");
        //pancake.GetComponentInChildren<SpriteRenderer>().sprite = pancakel1;
        ////Light.SetActive(true);
        Debug.Log("timetocook!");
        AkSoundEngine.PostEvent("CookPrompt", gameObject);
        AkSoundEngine.PostEvent("MiniMusic3", gameObject);
        AkSoundEngine.SetRTPCValue("MiniGame3Finish", 60f, null, 0);
        AkSoundEngine.SetRTPCValue("Pan_Sizzle", 100f, null, 0);
        //////Light.GetComponent<SpriteRenderer>().color = new Color(1.0f, 0.0f, 0.0f, 1.0f);

        //promt.ShowPromptAfter(0, 2, () =>
        //{
        //    Debug.Log("Closed");
        //    isPromptFinish = true;
        //    isCalledPrompt = true;
        //}, true);

        promt.Hide(() =>
        {
            promt.SetContent(promt.GetComponentsInChildren <Transform>(true)[5].gameObject);
            promt.PlayAnimations();
            promt.ShowPromptAfter(0, 4, () =>
            {
                isPromptFinish = true;
            }, true);
        });
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     //bowlSheet = new Sprite[43];
     pourTime = 0;
     prompt   = FindObjectOfType <PromptControl>();
     prompt.ShowPromptAfter(0, 4, () =>
     {
         Debug.Log("Closed");
         isPromptFinish = true;
     }, true);
 }
    public override void StartMinigame()
    {
        base.StartMinigame();
        SCORE          = 0;
        debugScoreText = FindObjectOfType <Text>();
        FindObjectOfType <InputManager>().SetMultitouch(false);

        promptControl      = FindObjectOfType <PromptControl>();
        shelfControl       = FindObjectOfType <ShelfControl>();
        ingredients        = new Dictionary <string, Sprite>();
        currentIngredients = new Dictionary <string, int>();

        manager = FindObjectOfType <MinigameManager>();

        totalIngredientsAmount   = 0;
        currentIngredientsAmount = 0;
        currentIngredient        = 0;

        foreach (IngredientNeeded i in ingredientsNeeded)
        {
            totalIngredientsAmount          += i.amount;
            currentIngredients[i.ingredient] = 0;
        }

        Ingredient[] ings = FindObjectsOfType <Ingredient>();
        foreach (Ingredient i in ings)
        {
            if (!ingredients.ContainsKey(i.ingredientName))
            {
                ingredients.Add(i.ingredientName, i.ingredientSprite);
            }
            i.Init();
        }
        //shelfControl.PlaceIngredients();
        if (debugScoreText != null)
        {
            debugScoreText.text = "SCORE: " + SCORE;
        }
        AskForIngredient(ingredientsNeeded[currentIngredient].ingredient, ingredientsNeeded[currentIngredient].amount);
    }
Exemplo n.º 4
0
 //private SpriteRenderer pancake;
 // Use this for initialization
 void Start()
 {
     //pancake = GameObject.FindGameObjectWithTag("Minigame4Pancake").GetComponentInChildren<SpriteRenderer>();
     prompt = FindObjectOfType <PromptControl>();
     AkSoundEngine.SetRTPCValue("SizzleVolume", 100f, null, 0);
 }