public interface

IEntity

implements IUpdateHandler IDrawable
org.anddev.andengine.entity.IEntity
Known Indirect Subclasses

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Nested Classes
interface IEntity.IEntityCallable  
interface IEntity.IEntityMatcher  
Public Methods
abstract void attachChild(IEntity pEntity)
abstract boolean attachChild(IEntity pEntity, int pIndex)
abstract void callOnChildren(IEntity.IEntityMatcher pEntityMatcher, IEntity.IEntityCallable pEntityCallable)
abstract void callOnChildren(IEntity.IEntityCallable pEntityCallable)
abstract void clearEntityModifiers()
abstract void clearUpdateHandlers()
abstract float[] convertLocalToSceneCoordinates(float pX, float pY, float[] pReuse)
abstract float[] convertLocalToSceneCoordinates(float[] pCoordinates, float[] pReuse)
abstract float[] convertLocalToSceneCoordinates(float[] pCoordinates)
abstract float[] convertLocalToSceneCoordinates(float pX, float pY)
abstract float[] convertSceneToLocalCoordinates(float pX, float pY)
abstract float[] convertSceneToLocalCoordinates(float[] pCoordinates)
abstract float[] convertSceneToLocalCoordinates(float pX, float pY, float[] pReuse)
abstract float[] convertSceneToLocalCoordinates(float[] pCoordinates, float[] pReuse)
abstract boolean detachChild(IEntity pEntity)
WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!
abstract IEntity detachChild(IEntity.IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!
abstract void detachChildren()
abstract boolean detachChildren(IEntity.IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!
abstract boolean detachSelf()
abstract IEntity findChild(IEntity.IEntityMatcher pEntityMatcher)
abstract float getAlpha()
abstract float getBlue()
abstract IEntity getChild(int pIndex)
abstract int getChildCount()
abstract int getChildIndex(IEntity pEntity)
abstract IEntity getFirstChild()
abstract float getGreen()
abstract float getInitialX()
abstract float getInitialY()
abstract IEntity getLastChild()
abstract Transformation getLocalToSceneTransformation()
abstract IEntity getParent()
abstract float getRed()
abstract float getRotation()
abstract float getRotationCenterX()
abstract float getRotationCenterY()
abstract float getScaleCenterX()
abstract float getScaleCenterY()
abstract float getScaleX()
abstract float getScaleY()
abstract float[] getSceneCenterCoordinates()
abstract Transformation getSceneToLocalTransformation()
abstract Object getUserData()
abstract float getX()
abstract float getY()
abstract int getZIndex()
abstract boolean hasParent()
abstract boolean isChildrenIgnoreUpdate()
abstract boolean isChildrenVisible()
abstract boolean isIgnoreUpdate()
abstract boolean isRotated()
abstract boolean isScaled()
abstract boolean isVisible()
abstract void onAttached()
abstract void onDetached()
abstract void registerEntityModifier(IEntityModifier pEntityModifier)
abstract void registerUpdateHandler(IUpdateHandler pUpdateHandler)
abstract void setAlpha(float pAlpha)
abstract boolean setChildIndex(IEntity pEntity, int pIndex)
abstract void setChildrenIgnoreUpdate(boolean pChildrenIgnoreUpdate)
abstract void setChildrenVisible(boolean pChildrenVisible)
abstract void setColor(float pRed, float pGreen, float pBlue, float pAlpha)
abstract void setColor(float pRed, float pGreen, float pBlue)
abstract void setIgnoreUpdate(boolean pIgnoreUpdate)
abstract void setInitialPosition()
abstract void setParent(IEntity pEntity)
abstract void setPosition(IEntity pOtherEntity)
abstract void setPosition(float pX, float pY)
abstract void setRotation(float pRotation)
abstract void setRotationCenter(float pRotationCenterX, float pRotationCenterY)
abstract void setRotationCenterX(float pRotationCenterX)
abstract void setRotationCenterY(float pRotationCenterY)
abstract void setScale(float pScale)
abstract void setScale(float pScaleX, float pScaleY)
abstract void setScaleCenter(float pScaleCenterX, float pScaleCenterY)
abstract void setScaleCenterX(float pScaleCenterX)
abstract void setScaleCenterY(float pScaleCenterY)
abstract void setScaleX(float pScaleX)
abstract void setScaleY(float pScaleY)
abstract void setUserData(Object pUserData)
abstract void setVisible(boolean pVisible)
abstract void setZIndex(int pZIndex)
abstract void sortChildren()
Sorts the IEntitys based on their ZIndex.
abstract void sortChildren(Comparator<IEntity> pEntityComparator)
Sorts the IEntitys based on the Comparator supplied.
abstract boolean swapChildren(IEntity pEntityA, IEntity pEntityB)
abstract boolean swapChildren(int pIndexA, int pIndexB)
abstract boolean unregisterEntityModifier(IEntityModifier pEntityModifier)
abstract boolean unregisterEntityModifiers(IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher)
abstract boolean unregisterUpdateHandler(IUpdateHandler pUpdateHandler)
abstract boolean unregisterUpdateHandlers(IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher)
[Expand]
Inherited Methods
From interface org.anddev.andengine.engine.handler.IUpdateHandler
From interface org.anddev.andengine.opengl.IDrawable

Public Methods

public abstract void attachChild (IEntity pEntity)

public abstract boolean attachChild (IEntity pEntity, int pIndex)

public abstract void callOnChildren (IEntity.IEntityMatcher pEntityMatcher, IEntity.IEntityCallable pEntityCallable)

public abstract void callOnChildren (IEntity.IEntityCallable pEntityCallable)

public abstract void clearEntityModifiers ()

public abstract void clearUpdateHandlers ()

public abstract float[] convertLocalToSceneCoordinates (float pX, float pY, float[] pReuse)

Parameters
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract float[] convertLocalToSceneCoordinates (float[] pCoordinates, float[] pReuse)

Parameters
pCoordinates must be of length 2.
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract float[] convertLocalToSceneCoordinates (float[] pCoordinates)

Parameters
pCoordinates must be of length 2.
Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertLocalToSceneCoordinates (float pX, float pY)

Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertSceneToLocalCoordinates (float pX, float pY)

Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertSceneToLocalCoordinates (float[] pCoordinates)

Parameters
pCoordinates must be of length 2.
Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertSceneToLocalCoordinates (float pX, float pY, float[] pReuse)

Parameters
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract float[] convertSceneToLocalCoordinates (float[] pCoordinates, float[] pReuse)

Parameters
pCoordinates must be of length 2.
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract boolean detachChild (IEntity pEntity)

WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!

public abstract IEntity detachChild (IEntity.IEntityMatcher pEntityMatcher)

WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!

public abstract void detachChildren ()

public abstract boolean detachChildren (IEntity.IEntityMatcher pEntityMatcher)

WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!

public abstract boolean detachSelf ()

public abstract IEntity findChild (IEntity.IEntityMatcher pEntityMatcher)

public abstract float getAlpha ()

public abstract float getBlue ()

public abstract IEntity getChild (int pIndex)

public abstract int getChildCount ()

public abstract int getChildIndex (IEntity pEntity)

public abstract IEntity getFirstChild ()

public abstract float getGreen ()

public abstract float getInitialX ()

public abstract float getInitialY ()

public abstract IEntity getLastChild ()

public abstract Transformation getLocalToSceneTransformation ()

public abstract IEntity getParent ()

public abstract float getRed ()

public abstract float getRotation ()

public abstract float getRotationCenterX ()

public abstract float getRotationCenterY ()

public abstract float getScaleCenterX ()

public abstract float getScaleCenterY ()

public abstract float getScaleX ()

public abstract float getScaleY ()

public abstract float[] getSceneCenterCoordinates ()

Returns
  • a shared(!) float[] of length 2.

public abstract Transformation getSceneToLocalTransformation ()

public abstract Object getUserData ()

public abstract float getX ()

public abstract float getY ()

public abstract int getZIndex ()

public abstract boolean hasParent ()

public abstract boolean isChildrenIgnoreUpdate ()

public abstract boolean isChildrenVisible ()

public abstract boolean isIgnoreUpdate ()

public abstract boolean isRotated ()

public abstract boolean isScaled ()

public abstract boolean isVisible ()

public abstract void onAttached ()

public abstract void onDetached ()

public abstract void registerEntityModifier (IEntityModifier pEntityModifier)

public abstract void registerUpdateHandler (IUpdateHandler pUpdateHandler)

public abstract void setAlpha (float pAlpha)

public abstract boolean setChildIndex (IEntity pEntity, int pIndex)

public abstract void setChildrenIgnoreUpdate (boolean pChildrenIgnoreUpdate)

public abstract void setChildrenVisible (boolean pChildrenVisible)

public abstract void setColor (float pRed, float pGreen, float pBlue, float pAlpha)

public abstract void setColor (float pRed, float pGreen, float pBlue)

public abstract void setIgnoreUpdate (boolean pIgnoreUpdate)

public abstract void setInitialPosition ()

public abstract void setParent (IEntity pEntity)

public abstract void setPosition (IEntity pOtherEntity)

public abstract void setPosition (float pX, float pY)

public abstract void setRotation (float pRotation)

public abstract void setRotationCenter (float pRotationCenterX, float pRotationCenterY)

public abstract void setRotationCenterX (float pRotationCenterX)

public abstract void setRotationCenterY (float pRotationCenterY)

public abstract void setScale (float pScale)

public abstract void setScale (float pScaleX, float pScaleY)

public abstract void setScaleCenter (float pScaleCenterX, float pScaleCenterY)

public abstract void setScaleCenterX (float pScaleCenterX)

public abstract void setScaleCenterY (float pScaleCenterY)

public abstract void setScaleX (float pScaleX)

public abstract void setScaleY (float pScaleY)

public abstract void setUserData (Object pUserData)

public abstract void setVisible (boolean pVisible)

public abstract void setZIndex (int pZIndex)

public abstract void sortChildren ()

Sorts the IEntitys based on their ZIndex. Sort is stable.

public abstract void sortChildren (Comparator<IEntity> pEntityComparator)

Sorts the IEntitys based on the Comparator supplied. Sort is stable.

public abstract boolean swapChildren (IEntity pEntityA, IEntity pEntityB)

public abstract boolean swapChildren (int pIndexA, int pIndexB)

public abstract boolean unregisterEntityModifier (IEntityModifier pEntityModifier)

public abstract boolean unregisterEntityModifiers (IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher)

public abstract boolean unregisterUpdateHandler (IUpdateHandler pUpdateHandler)

public abstract boolean unregisterUpdateHandlers (IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher)