コード例 #1
0
    override public void UpdateFade(float range)
    {
        float alpha = AlphaCulc.GetValue(range);

        Debug.Log(alpha);
        Color color = FadeImage.color;

        color.a         = alpha;
        FadeImage.color = color;
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (MoveNow == true)
     {
         Counter += Time.deltaTime;
         if (Counter >= 3f)
         {
             Counter = 3f;
             MoveNow = false;
         }
         float x = XCulc.GetValue(Counter);
         float y = YCulc.GetValue(Counter);
         MoveObject.transform.localPosition = new Vector3(x, y, 0f);
     }
 }
コード例 #3
0
 void Update()
 {
     if (NowState == State.FadeIn)
     {
         PassTime += Time.deltaTime;
         float alpha = FadeInCulc.GetValue(PassTime);
         Debug.Log(alpha);
         CuFadeObjectBase.UpdateFade(alpha);
         if (PassTime >= AnimationTime)
         {
             NowState = State.FadeWait;
             PassTime = 0f;
         }
     }
     else if (NowState == State.FadeOut)
     {
         PassTime += Time.deltaTime;
         float alpha = FadeOutCulc.GetValue(PassTime);
         Debug.Log(alpha);
         CuFadeObjectBase.UpdateFade(alpha);
         if (PassTime >= AnimationTime)
         {
             NowState = State.None;
             gameObject.SetActive(false);
             EndCallback?.Invoke();
         }
     }
     else if (NowState == State.FadeWait)
     {
         PassTime += Time.deltaTime;
         if (PassTime >= WaitTime)
         {
             NowState = State.None;
             EndCallback?.Invoke();
         }
     }
 }