예제 #1
0
    private IEnumerator AnimateRating(float rating, float money)
    {
        MovingUtility.FloatLerpContainer bg = new MovingUtility.FloatLerpContainer()
        {
            Duration    = 1,
            StartValue  = 0,
            TargetValue = 1
        };

        MovingUtility.FloatLerpContainer lerp = new MovingUtility.FloatLerpContainer()
        {
            Duration    = 1,
            StartValue  = 0,
            TargetValue = rating
        };

        MovingUtility.FloatLerpContainer lerpMoney = new MovingUtility.FloatLerpContainer()
        {
            Duration    = 2,
            StartValue  = 0,
            TargetValue = money
        };

        yield return(MovingUtility.LerpFloat(bg, BackGroundAlpha));

        _continueButton.gameObject.SetActive(true);
        MovingUtility.LerpFloat(lerp, Rating);
        yield return(new WaitForSeconds(0.5f));

        MovingUtility.LerpFloat(lerpMoney, LerpMoney);
    }
예제 #2
0
    public void Despawn()
    {
        var despawnAnim = new MovingUtility.FloatLerpContainer()
        {
            Duration    = 1f,
            StartValue  = 0,
            TargetValue = 1
        };

        Spawner.Instance.RemoveFromWaiting(this);

        MovingUtility.LerpFloat(despawnAnim, DespawnAnimation, DespawnEnd);
    }
예제 #3
0
    public void Spawn(Transform origin)
    {
        transform.position = origin.position;
        transform.rotation = origin.rotation;
        gameObject.SetActive(true);

        var spawnSize = new MovingUtility.FloatLerpContainer()
        {
            Duration    = 1f,
            StartValue  = 0,
            TargetValue = 1
        };

        MovingUtility.LerpFloat(spawnSize, SpawnAnimation);
    }
예제 #4
0
    private IEnumerator AnimateStart()
    {
        MovingUtility.FloatLerpContainer bg = new MovingUtility.FloatLerpContainer()
        {
            Duration    = 1,
            StartValue  = 0,
            TargetValue = 1
        };

        MovingUtility.FloatLerpContainer completeness = new MovingUtility.FloatLerpContainer()
        {
            Duration    = 2f,
            StartValue  = 0,
            TargetValue = (float)LevelStatus.Instance.SuccessfulCustomers / (float)LevelStatus.Instance.TotalCustomers
        };


        MovingUtility.LerpFloat(completeness, LevelFillAmount);
        MovingUtility.LerpFloat(completeness, PercentsAmount);
        yield return(MovingUtility.LerpFloat(bg, SetBackgroundAlpha));
    }