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); }
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); }
public override MtAction Reverse() { return(MtActionFloat.Create(m_duration, m_to, m_from, m_onValueChanged)); }