andengine

AndEngine Examples not working

混江龙づ霸主 提交于 2019-12-13 16:05:47
问题 I configured the AndEngine example on my eclipse a day ago by following a video tutorial. It was running fine. But the very next day, when I tried to run the example, it says your project contains errors. I check the properties of project and other things but found nothing like error. I am unable to figure out what is causing the project to build. Can anyone help me in this regard? I can't see any error. I just show a cross on Examples project. I deleted all the extensions and examples and

AndEngine camera and Device display : Ratio between co-ordinates on each

ⅰ亾dé卋堺 提交于 2019-12-13 09:36:00
问题 I'm using a FrameLayout on top of Andengine camera to add a button. I need to align the button to a sprite on the andengine camera. I'm using gravity top in the frame layout and adding top padding to shift the button down. Works while on the development device. But because of the RatioResolutionPolicy , on a different device with different screen size, the alignment does not work. I am wondering how to find the device screen Display co-ordinates that would exactly coincide with the AndEngine

AndEngine - Drawing a Line between Level Objects/Entites using matching IDs

巧了我就是萌 提交于 2019-12-13 08:37:22
问题 [Edit 4]Nvm I forgot to add: childInt_id[i] = Integer.parseInt(childString_id[i]); [Edit 3]So now I want to be able to have a parent entity have multiple children <entity x="640" y="224" type="gamebutton1" id="1" child_id="2, 3"/> I'm now parsing child_id as a string, converting it to a string array via .split(","), and converting the string array to an int array final String child_id = SAXUtils.getAttributeOrThrow(pAttributes, TAG_ENTITY_ATTRIBUTE_CHILD_ID); String[] childString_id = child

make a body which moves continuously

懵懂的女人 提交于 2019-12-13 06:12:53
问题 I am working with Box-2d & AndEngine . I have dynamic body lets say a Plane . I want to moves this continuously with a given velocity. So, I set a linear Velocity to it. I have screen boundary(ground,roof,left & Right Wall) as well. Those are static body. When my plane collides with boundaries one or two times, it's becomes stopped. I apply no gravity to plane. Why plane stopped though it has fixed velocity? Problem : How I move the plane with continuous speed as well as corresponding

andengine Tower Defence game - Enemy<-Weapon interaction

寵の児 提交于 2019-12-13 02:39:25
问题 What is the most correct from the performance point of view - algorithm of interaction between Enemy and Weapon(bullet maybe more correct here) ? Should every sprite every single bullet check for collisions via "collidesWith" method with iteration on full enemies list ? Or bullet should be aware about nearest enemies and check only them ? How it could be implemented with TMXMaps ? Maybe I need to dynamically set some kind of information into the TMXMap Tile properties and operate with it ?

Type enum is not generic error cloning andengine

守給你的承諾、 提交于 2019-12-13 02:29:36
问题 I keep getting this error after cloning a repository from the AndEngine project.. The type Enum is not generic; it cannot be parameterized with arguments <BoundsSplit> Here is the class where the error persists. package org.andengine.util.spatial.adt.bounds; //The error points at the beginning of this line. import org.andengine.util.exception.AndEngineException; /** * (c) Zynga 2011 * * @author Nicolas Gramlich <ngramlich@zynga.com> * @since 21:13:32 - 11.10.2011 */ public enum BoundsSplit {

AndEngine: Handling collisions with TMX Objects

≡放荡痞女 提交于 2019-12-12 18:29:00
问题 I managed to load a tmx map now I would like to create the obstacle that the sprite can not move, I recovered the obstacle like this : try { final TMXLoader tmxLoader = new TMXLoader(this, this.mEngine.getTextureManager(), TextureOptions.BILINEAR_PREMULTIPLYALPHA, new ITMXTilePropertiesListener() { @Override public void onTMXTileWithPropertiesCreated(final TMXTiledMap pTMXTiledMap, final TMXLayer pTMXLayer, final TMXTile pTMXTile, final TMXProperties<TMXTileProperty> pTMXTileProperties) { /*

AndEngine - Enable a disabled child button based on whether the parent button has been pressed

主宰稳场 提交于 2019-12-12 15:26:00
问题 With the current set-up that I have thanks to the answer here. How do I disabled child button based on whether the parent button has been pressed? for example Button2 is currently disabled, but when I press Button1 I can now press Button2 and if I press Button2, Button3 and Button4 become enabled and can now be pressed. So far the way I'm doing it is as following: Declare a boolean: boolean Enable = false; Change Enable from false to true when a button is clicked: if (type.equals(TAG_ENTITY

Fast moving bodies miss the collision sometimes in Box2d, AndEngine

跟風遠走 提交于 2019-12-12 11:37:00
问题 I have a Fast Moving Body(A) which is dynamic. It is supposed to collide with another Body(B). A collides with B, but sometimes it passes the Body B without collision. This is totally random behavior. I must have that collision. Kindly guide why it is acting like this, randomly. 回答1: The effect of one object passing through another due to large movement in a single timestep is called tunneling . Box2D uses Continuous Collision Detection between dynamic and static objects to solve this problem

SharedPreference Changes not reflected in my wallpaper service

我与影子孤独终老i 提交于 2019-12-12 08:54:43
问题 I am making a live wallpaper where i need to change the speed of a vehicle in setting scene and it needs to get reflected back to the wallpaper service when i press the return button. In my preference activity, i save the list preference changes in shared preferences like this :- @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.prefs); ListPreference listPreference = (ListPreference) findPreference("listPref");