示例#1
0
 protected void Update()
 {
     if (this.highlight_image != null)
     {
         if (this.highlighted)
         {
             Color highlight_colour = this.can_drop ? this.highlight_good_colour : this.highlight_bad_colour;
             this.highlight_image.color = Color.Lerp(
                 highlight_colour.Adjusted(a: 0.2f),
                 highlight_colour.Adjusted(a: 0.4f),
                 this.highlight_pulse_lerp);
         }
         else
         {
             this.highlight_image.color = this.highlight_image.color.Adjusted(a: 0);
         }
     }
 }
示例#2
0
    void Update()
    {
        m_life_time            += Time.deltaTime / 2f;
        m_coin_image.color      = Color.Lerp(m_start_colour, m_start_colour.Adjusted(a: 0f), m_FadeCurve.Evaluate(m_life_time));
        this.transform.position = Vector3.Lerp(m_start_position, m_offsetUpMax, m_MovementCurve.Evaluate(m_life_time / 2f));

        if (m_life_time >= 1f)
        {
            this.enabled = false;
            this.transform.SetParent(null);
            Destroy(this.gameObject);
        }
    }