Example #1
0
    public override void Enter()
    {
        base.Enter();
        var valueAct = MtActionFloat.Create(4, 0, 1.5f, (float value) => {
            SetSubTitle(string.Format("Value用4秒时间从0变化到1.5,当前值为:{0}", value.ToString("F3")));
        });

        m_tfCube.RunAction(valueAct);
    }
Example #2
0
    public static MtActionFloat Create(float duration, float from, float to, Action <float> onValueChanged)
    {
        MtActionFloat actValue = new MtActionFloat();

        if (actValue.InitWithDuration(duration, from, to, onValueChanged))
        {
            return(actValue);
        }
        return(null);
    }
Example #3
0
 public override MtAction Reverse()
 {
     return(MtActionFloat.Create(m_duration, m_to, m_from, m_onValueChanged));
 }