public override void Enter() { base.Enter(); var move = MtMoveBy.Create(1, new Vector3(3, 0, 0)); m_tfCube.RunAction(move); }
public static MtMoveBy Create(float duration, Vector3 deltaPosition) { MtMoveBy ret = new MtMoveBy(); if (ret.InitWithDuration(duration, deltaPosition)) { return(ret); } return(null); }
public override void Enter() { base.Enter(); var move = MtMoveBy.Create(1, new Vector3(3, 0, 0)); var easeIn = MtEaseExponentialIn.Create(move); var moveBack = MtMoveBy.Create(1, new Vector3(-3, 0, 0)); var easeOut = MtEaseExponentialOut.Create(moveBack); var sequence = MtSequence.Create(easeIn, easeOut); m_tfCube.RunAction(sequence); }
public override void Enter() { base.Enter(); var move1 = MtMoveBy.Create(0.5f, new Vector3(3, 0, 0)); var move2 = MtMoveBy.Create(0.5f, new Vector3(0, 3, 0)); var func = MtCallFunc.Create((Transform trans) => { SetSubTitle(string.Format("名字为{0}的GameObject走完一周...", trans.name)); }); var sequence1 = MtSequence.Create(move1, move2); var sequence2 = MtSequence.Create(sequence1, sequence1.Reverse() as MtSequence, func); m_tfCube.RunAction(sequence2); }
public override MtAction Reverse() { return(MtMoveBy.Create(m_duration, -m_positionDelta)); }
public override MtICloneable Clone() { return(MtMoveBy.Create(m_duration, m_positionDelta)); }
public static MtMoveBy Create(float duration, Vector2 deltaPosition) { return(MtMoveBy.Create(duration, new Vector3(deltaPosition.x, deltaPosition.y, 0))); }