public void Update()
    {
        if (!OvermapHandler.IsOvermapRunning())
        {
            return;
        }

        if ((int)GameData.state >= (int)GameData.State.DefeatedTank && !OvermapHandler.GetInstance().sleezerActive)
        {
            // Count down timer to next popup
            nextSpawnTimer -= Time.deltaTime;
            if (nextSpawnTimer <= 0f)
            {
                nextSpawnTimer = Random.Range(7f, 15f);
                SpawnChatBubble(GetCharacterTransformToSayChatBubble());
            }
        }
    }
    private void Update()
    {
        if (materialTintColor.a > 0)
        {
            float tintFadeSpeed = 6f;
            materialTintColor.a -= tintFadeSpeed * Time.deltaTime;
            material.SetColor("_Tint", materialTintColor);
        }

        if (!OvermapHandler.IsOvermapRunning())
        {
            playerBase.PlayIdleAnim();
            return; // Overmap not running
        }

        switch (character.type)
        {
        default:
            switch (state)
            {
            case State.Normal:
                HandleTargetMovePosition();
                HandleMovement();
                break;
            }
            break;

        case Character.Type.Sleezer:
            switch (state)
            {
            case State.Normal:
                HandleTargetMovePosition();
                HandleSleezer();
                HandleMovement();
                break;
            }
            break;
        }
    }
示例#3
0
    private void Update()
    {
        if (!OvermapHandler.IsOvermapRunning() && !overrideOvermapRunning)
        {
            //playerBase.PlayIdleAnim();
            return; // Overmap not running
        }

        switch (state)
        {
        case State.Normal:
            HandleMovement();
            break;
        }

        if (materialTintColor.a > 0)
        {
            float tintFadeSpeed = 6f;
            materialTintColor.a -= tintFadeSpeed * Time.deltaTime;
            material.SetColor("_Tint", materialTintColor);
        }
    }