Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (PooProgress != null)
        {
            if (PooProgress.PooPercentageComplete() > 1f)  // 100% //1.3f)
            {
                if (player != null)
                {
                    player.ShitPants();
                }
                //LoadLosingScene();
            }
        }

        if (LevelProgress != null && gameDirection == Direction.RIGHT)
        {
            if (LevelProgress.ProgressPercentage() >= 1.0f)
            {
                LoadStoreScene();
            }
        }

        if (LevelProgress != null && gameDirection == Direction.LEFT)
        {
            if (LevelProgress.ProgressPercentage() >= 1.0f)
            {
                LoadWinScene();
            }
        }
    }
Пример #2
0
    //private float startY;

    void Start()
    {
        Instance = this;
        GlobalManager.Instance.PooProgress = this;
        beginProgress = true;
        colonImage    = this.GetComponent <Image>();
        pooImage      = poo.gameObject.GetComponent <Image>();

        // based on time
        pooTimer = POO_TIME;

        // based on distance
        //maxRange = poo.position.y - end.position.y;
        //max = poo.position.y;

        PushPooDeeper(-maxRange * startingProgress);
        Debug.Log("maxx " + max);
    }