Пример #1
0
    public ActionInterval OnClick17()
    {
        var action = CCActionSequence.Create(
            CCAction.CCDelay(0, () => { Reset(); SetTile("变速Bounce"); }),
            image2.gameObject.CCShow(),
            CCAction.CCDelay(0, () => { SetTile("变速BounceIn 上图先慢后快,下图正常"); }),
            CCAction.CCSpawn(
                CCAction.CCBounceEaseIn(image.transform.CCMoveTo(duration * 0.5f, new Vector3(200, 0, 0))),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(200, -100, 0)),
                CCActionDelay.Create(0f)
                ),
            CCActionDelay.Create(0.1f),
            CCAction.CCSpawn(
                CCAction.CCBounceEaseIn(image.transform.CCMoveTo(duration * 0.5f, new Vector3(0, 0, 0))),
                image2.transform.CCMoveTo(duration * 0.5f, new Vector3(0, -100, 0)),
                CCActionDelay.Create(0f)
                ),

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

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

        return(action);
    }