Beispiel #1
0
    private void Update()
    {
        animatedPlaceHolderSize.targetValue = chessControl.observeMode ? observePlaceholderSize : isHighlighted ? highlightPlaceholderSize : 1f;
        animatedPlaceHolderSize.Evolve(Time.deltaTime);
        placeholder.transform.localScale = Vector3.one * animatedPlaceHolderSize.value;

        animatedChessSize.targetValue = chessControl.observeMode ? observeChessSize : 1f;
        animatedChessSize.Evolve(Time.deltaTime);
        Vector3 scale = Vector3.one * animatedChessSize.value;

        player1Chess.transform.localScale = scale;
        player2Chess.transform.localScale = scale;

        animatedRotationAngle.Evolve(Time.deltaTime);
        transform.rotation = Quaternion.Euler(0, animatedRotationAngle.value, 0);
    }
Beispiel #2
0
 private void Update()
 {
     intensityValue.Evolve(Time.deltaTime);
     glowMaterial.SetColor("_Color", new Color(1, 1, 1, Mathf.Max(intensityValue.value, 0)));
     if (intensityValue.value > 0.01f && !isVisible)
     {
         isVisible = true;
         foreach (GameObject obj in gameObjects)
         {
             obj.SetActive(true);
         }
     }
     else if (intensityValue.value <= 0.01f && isVisible)
     {
         isVisible = false;
         foreach (GameObject obj in gameObjects)
         {
             obj.SetActive(false);
         }
     }
 }