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

        m_tfCube.RunAction(move);
    }
Ejemplo n.º 2
0
    public static MtMoveBy Create(float duration, Vector3 deltaPosition)
    {
        MtMoveBy ret = new MtMoveBy();

        if (ret.InitWithDuration(duration, deltaPosition))
        {
            return(ret);
        }
        return(null);
    }
Ejemplo n.º 3
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);
    }
Ejemplo n.º 4
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);
    }
Ejemplo n.º 5
0
 public override MtAction Reverse()
 {
     return(MtMoveBy.Create(m_duration, -m_positionDelta));
 }
Ejemplo n.º 6
0
 public override MtICloneable Clone()
 {
     return(MtMoveBy.Create(m_duration, m_positionDelta));
 }
Ejemplo n.º 7
0
 public static MtMoveBy Create(float duration, Vector2 deltaPosition)
 {
     return(MtMoveBy.Create(duration, new Vector3(deltaPosition.x, deltaPosition.y, 0)));
 }