Beispiel #1
0
 public static GroupManagerEntity getInstance()
 {
     if (mGroupManagerEntitySingleton == null)
     {
         mGroupManagerEntitySingleton = new GroupManagerEntity();
     }
     return(mGroupManagerEntitySingleton);
 }
Beispiel #2
0
 // register all entity default
 public override void registerAllEntity()
 {
     base.registerAllEntity();
     registerEntity(SimpleAISetSingleton.getInstance());
     registerEntity(InfluenceMapSingleton.getInstance());
     GameObject[] allCollision = GameObject.FindGameObjectsWithTag("Collision");
     GameObject[] allBarrier   = GameObject.FindGameObjectsWithTag("Barrier");
     for (int i = 0; i < allCollision.Length; i++)
     {
         CollisionEntity tEntity = new CollisionEntity();
         tEntity.mGameObject = allCollision [i];
         registerEntity(tEntity);
     }
     for (int i = 0; i < allBarrier.Length; i++)
     {
         CollisionEntity tEntity = new CollisionEntity();
         tEntity.mGameObject = allBarrier [i];
         registerEntity(tEntity);
     }
     //	registerEntity (GroupManagerEntity.getInstance());
     registerEntity(GroupManagerEntity.getInstance());
     registerEntity(AntPopulationEntity.getInstance());
 }