Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added "getEntityModifierCount" and "getUpdateHandlerCount" to all

entities.
  • Loading branch information...
commit b18c7fa4c94e13c63b0ed586f04666aa576216b0 1 parent a28dafd
player_03 authored
View
16 src/org/andengine/entity/Entity.java
@@ -834,6 +834,14 @@ public boolean unregisterUpdateHandlers(final IUpdateHandlerMatcher pUpdateHandl
}
return this.mUpdateHandlers.removeAll(pUpdateHandlerMatcher);
}
+
+ @Override
+ public int getUpdateHandlerCount() {
+ if(this.mUpdateHandlers == null) {
+ return 0;
+ }
+ return this.mUpdateHandlers.size();
+ }
@Override
public void clearUpdateHandlers() {
@@ -866,6 +874,14 @@ public boolean unregisterEntityModifiers(final IEntityModifierMatcher pEntityMod
}
return this.mEntityModifiers.removeAll(pEntityModifierMatcher);
}
+
+ @Override
+ public int getEntityModifierCount() {
+ if(this.mEntityModifiers == null) {
+ return 0;
+ }
+ return this.mEntityModifiers.size();
+ }
@Override
public void clearEntityModifiers() {
View
2  src/org/andengine/entity/IEntity.java
@@ -295,11 +295,13 @@
public void registerUpdateHandler(final IUpdateHandler pUpdateHandler);
public boolean unregisterUpdateHandler(final IUpdateHandler pUpdateHandler);
public boolean unregisterUpdateHandlers(final IUpdateHandlerMatcher pUpdateHandlerMatcher);
+ public int getUpdateHandlerCount();
public void clearUpdateHandlers();
public void registerEntityModifier(final IEntityModifier pEntityModifier);
public boolean unregisterEntityModifier(final IEntityModifier pEntityModifier);
public boolean unregisterEntityModifiers(final IEntityModifierMatcher pEntityModifierMatcher);
+ public int getEntityModifierCount();
public void clearEntityModifiers();
public boolean isCullingEnabled();
View
10 src/org/andengine/entity/scene/menu/item/decorator/BaseMenuItemDecorator.java
@@ -414,6 +414,11 @@ public boolean unregisterEntityModifiers(final IEntityModifierMatcher pEntityMod
}
@Override
+ public int getEntityModifierCount() {
+ return this.mMenuItem.getEntityModifierCount();
+ }
+
+ @Override
public void clearEntityModifiers() {
this.mMenuItem.clearEntityModifiers();
}
@@ -794,6 +799,11 @@ public boolean unregisterUpdateHandler(final IUpdateHandler pUpdateHandler) {
}
@Override
+ public int getUpdateHandlerCount() {
+ return this.mMenuItem.getUpdateHandlerCount();
+ }
+
+ @Override
public void clearUpdateHandlers() {
this.mMenuItem.clearUpdateHandlers();
}
Please sign in to comment.
Something went wrong with that request. Please try again.