Beispiel #1
0
    public override void Enter()
    {
        base.Enter();
        var move = MtMoveBy.Create(1, new Vector3(3, 0, 0));

        m_tfCube.RunAction(move);
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    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);
    }
Beispiel #4
0
 public override MtAction Reverse()
 {
     return(MtMoveBy.Create(m_duration, -m_positionDelta));
 }
Beispiel #5
0
 public override MtICloneable Clone()
 {
     return(MtMoveBy.Create(m_duration, m_positionDelta));
 }
Beispiel #6
0
 public static MtMoveBy Create(float duration, Vector2 deltaPosition)
 {
     return(MtMoveBy.Create(duration, new Vector3(deltaPosition.x, deltaPosition.y, 0)));
 }