Skip to content

Commit

Permalink
Release 0.2.0 which essentially only upgrades artemis-odb to 1.0.0
Browse files Browse the repository at this point in the history
Update README.md for v0.2.0
  • Loading branch information
Namek committed Oct 2, 2015
1 parent 8cfb840 commit 9008207
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ Server and Client that provides online tracking of [artemis-odb](https://github.
<dependency>
<groupId>net.namekdev.entity_tracker</groupId>
<artifactId>artemis-entity-tracker</artifactId>
<version>0.1.0</version>
<version>0.2.0</version>
</dependency>

<!-- uncomment in case you need GUI inside your game -->
<!--dependency>
<groupId>net.namekdev.entity_tracker</groupId>
<artifactId>artemis-entity-tracker-gui</artifactId>
<version>0.1.0</version>
<version>0.2.0</version>
</dependency-->
```

### Gradle

```groovy
dependencies {
compile "net.namekdev.entity_tracker:artemis-entity-tracker:0.1.0"
compile "net.namekdev.entity_tracker:artemis-entity-tracker:0.2.0"
// uncomment in case you need GUI inside your game
// compile "net.namekdev.entity_tracker:artemis-entity-tracker-gui:0.1.0"
// uncomment in case you need GUI instantiated directly from your game
// compile "net.namekdev.entity_tracker:artemis-entity-tracker-gui:0.2.0"
}
```

Expand Down
2 changes: 1 addition & 1 deletion artemis-entity-tracker-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.namekdev.entity_tracker</groupId>
<artifactId>artemis-entity-tracker-parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.2.0</version>
</parent>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions artemis-entity-tracker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>net.namekdev.entity_tracker</groupId>
<artifactId>artemis-entity-tracker-parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.2.0</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<artemis-odb.version>0.10.2</artemis-odb.version>
<artemis-odb.version>[1.0.0,2.0.0)</artemis-odb.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.artemis.Manager;
import com.artemis.utils.Bag;
import com.artemis.utils.ImmutableBag;
import com.artemis.utils.IntBag;
import com.artemis.utils.reflect.ClassReflection;
import com.artemis.utils.reflect.Field;
import com.artemis.utils.reflect.Method;
Expand Down Expand Up @@ -84,9 +85,14 @@ protected void initialize() {

private void find42UnicornManagers() {
ImmutableBag<BaseSystem> systems = world.getSystems();
int index = 0;
for (int i = 0, n = systems.size(); i < n; ++i) {
BaseSystem system = systems.get(i);

if (system instanceof Manager) {
continue;
}

Class<? extends BaseSystem> systemType = system.getClass();
String systemName = systemType.getSimpleName();
Aspect aspect = null;
Expand Down Expand Up @@ -116,12 +122,17 @@ private void find42UnicornManagers() {
listenForEntitySetChanges(info);
}

updateListener.addedSystem(i, systemName, aspectInfo.allTypes, aspectInfo.oneTypes, aspectInfo.exclusionTypes);
updateListener.addedSystem(index++, systemName, aspectInfo.allTypes, aspectInfo.oneTypes, aspectInfo.exclusionTypes);
}

ImmutableBag<Manager> managers = world.getManagers();
for (int i = 0, n = managers.size(); i < n; ++i) {
Manager manager = managers.get(i);
for (int i = 0, n = systems.size(); i < n; ++i) {
BaseSystem system = systems.get(i);

if (!(system instanceof Manager)) {
continue;
}

Manager manager = (Manager) system;

Class<? extends Manager> managerType = manager.getClass();
String managerName = managerType.getSimpleName();
Expand All @@ -137,7 +148,7 @@ private void find42UnicornManagers() {
private void listenForEntitySetChanges(final SystemInfo info) {
info.subscription.addSubscriptionListener(new SubscriptionListener() {
@Override
public void removed(ImmutableBag<Entity> entities) {
public void removed(IntBag entities) {
info.entitiesCount -= entities.size();

if (updateListener != null && (updateListener.getListeningBitset() & WorldUpdateListener.ENTITY_SYSTEM_STATS) != 0) {
Expand All @@ -146,7 +157,7 @@ public void removed(ImmutableBag<Entity> entities) {
}

@Override
public void inserted(ImmutableBag<Entity> entities) {
public void inserted(IntBag entities) {
info.entitiesCount += entities.size();

if (info.entitiesCount > info.maxEntitiesCount) {
Expand Down Expand Up @@ -189,7 +200,7 @@ public void added(Entity e) {
inspectNewComponentTypesAndNotify();
}

updateListener.addedEntity(e.id, (BitSet) componentBitset.clone());
updateListener.addedEntity(e.getId(), (BitSet) componentBitset.clone());
}

@Override
Expand All @@ -198,7 +209,7 @@ public void deleted(Entity e) {
return;
}

updateListener.deletedEntity(e.id);
updateListener.deletedEntity(e.getId());
}

private void inspectNewComponentTypesAndNotify() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.namekdev.entity_tracker</groupId>
<artifactId>artemis-entity-tracker-parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.2.0</version>
<packaging>pom</packaging>
<name>artemis-odb Entity Tracker</name>
<description>Server and Client that provides online tracking and management of artemis-odb World state.</description>
Expand Down

0 comments on commit 9008207

Please sign in to comment.