开发者

Android AndEngine analogController

开发者 https://www.devze.com 2023-02-17 07:53 出处:网络
i am new to AndEngine, Can i use standart analogController and allow only horizontal or vertical moving of it ?

i am new to AndEngine,

Can i use standart analogController and allow only horizontal or vertical moving of it ?

I undestand that i can use this controller to draw my own only with X\开发者_开发知识库Y coordinate, but i am interesting if there is standart functionality to make such horizontal\vertical controller ? (not only ignore one of the axis but restrict moving on it)

Thx for answer.


The answer was to make HorizontalAnalogScreenController from BaseController and AnalogController: super.onUpdateControlKnob(pRelativeX, 0);


Use DigitalOnScreenControl instead of an AnalogOnScreenControl.

0

精彩评论

暂无评论...
验证码 换一张
取 消