Beispiel #1
0
    public void ShowPanel(LevelEndCondition endCondition)
    {
        LevelSceneManager.GameIsActive = false;

        int maxLevel = LevelEditorDataManager.Instance.GetLevelsDictionary().Last().Key;

        switch (endCondition)
        {
        case LevelEndCondition.LevelComplete:
            LevelEndPanelText.key = CompleteKey;
            if (currentLevel != maxLevel)
            {
                NextLevelButton.SetActive(true);
            }
            sfxManager.PlayClip(sfxManager.LevelComplete);
            break;

        case LevelEndCondition.LevelFailed:
            LevelEndPanelText.key = FailKey;
            RetryButton.SetActive(true);
            sfxManager.PlayClip(sfxManager.LevelFailed);
            break;
        }
        LevelEndPanel.SetActive(true);
    }
    IEnumerator FROM()
    {
        for (int i = 0; i < amount; i++)
        {
            var VFX = (GameObject)Instantiate(ThingToSpawn, originButton.transform.position, Quaternion.identity);
            VFX.transform.SetParent(parentForObject.transform);
            yield return(new WaitForSeconds(0.3f));

            iTween.MoveTo(VFX, iTween.Hash("position", Destination.transform.position + offset, "easytype", easeType, "ignoretimescale", true, "time", time));
            Destroy(VFX, time);
            yield return(new WaitForSeconds(rate));
        }
        originButton.SetActive(false);
        ShopManager.Instance.AddDiamond(shopmanagerScript.EarningDiamonds);
        Debug.Log("vfx wali script se kara add");

        if (giftReward != true)
        {
            RetryButton.SetActive(true);
        }
        if (giftReward == true)
        {
            BackButton.SetActive(true);
        }
        //Make the coin increase explosion here
    }