Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

problems on play [laya.ui.Clip] #41

Open
HongMok opened this issue Jun 14, 2018 · 1 comment
Open

problems on play [laya.ui.Clip] #41

HongMok opened this issue Jun 14, 2018 · 1 comment

Comments

@HongMok
Copy link

HongMok commented Jun 14, 2018

  1. [onDisplay()] does not remember [toIndex]
    replace play() with playFromCurr(),
    playFromCurr() does not modify toIndex
    https://github.com/layabox/layaair/blob/d1811049e17fc73915ae014f7e25dfbd7ae889cb/bin/as/libs/src/laya/ui/Clip.as#L182-L190

2.[play()] does not remember [fromIndex]
add this.fromIndex = from, set index = fromIndex when index > toIndex;
https://github.com/layabox/layaair/blob/d1811049e17fc73915ae014f7e25dfbd7ae889cb/bin/as/libs/src/laya/ui/Clip.as#L429-L443

  1. [ play(from, to, autoLoop), make autoLoop is optional ]
    play() is auto loop, but play(from, to) not.
    sometimes we need an autoLoop play(from, to)
    https://github.com/layabox/layaair/blob/d1811049e17fc73915ae014f7e25dfbd7ae889cb/bin/as/libs/src/laya/ui/Clip.as#L445-L455
@aaronswiftming
Copy link

Thanks for your advices.
It designed need manual record like ‘ currentIndex = m_clip.index; ”
Then use [play(currentIndex, to);]

The play(from,to, loop) auto loop you can change the source code of the engine. Make it functional.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants