Example #1
0
    public ActionInterval OnClick14()
    {
        var action = CCActionSequence.Create(
            CCAction.CCDelay(0, () => { Reset(); SetTile("变速Ease"); }),
            image2.gameObject.CCShow(),
            CCAction.CCDelay(0, () => { SetTile("变速EaseIn 上图先慢后快,下图正常"); }),
            CCAction.CCSpawn(
                CCAction.CCEaseIn(image.transform.CCMoveTo(duration * 0.5f, new Vector3(200, 0, 0)), 2),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(200, -100, 0)),
                CCActionDelay.Create(0f)
                ),
            CCActionDelay.Create(0.1f),
            CCAction.CCSpawn(
                CCAction.CCEaseIn(image.transform.CCMoveTo(duration * 0.5f, new Vector3(0, 0, 0)), 2),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(0, -100, 0)),
                CCActionDelay.Create(0f)
                ),

            CCAction.CCDelay(0.1f, () => { SetTile("变速EaseOut 上图先快后慢,下图正常"); }),
            CCAction.CCSpawn(
                CCAction.CCEaseOut(image.transform.CCMoveTo(duration * 0.5f, new Vector3(200, 0, 0)), 2),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(200, -100, 0)),
                CCActionDelay.Create(0f)
                ),
            CCActionDelay.Create(0.1f),
            CCAction.CCSpawn(
                CCAction.CCEaseOut(image.transform.CCMoveTo(duration * 0.5f, new Vector3(0, 0, 0)), 2),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(0, -100, 0)),
                CCActionDelay.Create(0f)
                ),

            CCAction.CCDelay(0.1f, () => { SetTile("变速EaseInOut 上图前后慢中间快,下图正常"); }),
            CCAction.CCSpawn(
                CCAction.CCEaseInOut(image.transform.CCMoveTo(duration * 0.5f, new Vector3(200, 0, 0)), 2),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(200, -100, 0)),
                CCActionDelay.Create(0f)
                ),
            CCActionDelay.Create(0.1f),
            CCAction.CCSpawn(
                CCAction.CCEaseInOut(image.transform.CCMoveTo(duration * 0.5f, new Vector3(0, 0, 0)), 2),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(0, -100, 0)),
                CCActionDelay.Create(0f)
                ),
            CCActionDelay.Create(0f)
            );

        return(action);
    }