diff --git a/src/main/java/cactusServer/utils/App.java b/src/main/java/cactusServer/utils/App.java index d981c06..979a556 100644 --- a/src/main/java/cactusServer/utils/App.java +++ b/src/main/java/cactusServer/utils/App.java @@ -8,7 +8,11 @@ import javax.ws.rs.core.Application; import org.glassfish.jersey.server.ResourceConfig; +import org.ntlab.radishforandroidstudio.framework.model3D.Position3D; +import org.ntlab.radishforandroidstudio.framework.model3D.Quaternion3D; +import cactusServer.entities.*; +import cactusServer.entities.Character; import cactusServer.models.Accounts; import cactusServer.models.CharacterModelManager; import cactusServer.models.Instances; @@ -23,11 +27,12 @@ StageModelManager.getInstance(); CharacterModelManager.getInstance(); Instances.getInstance(); - Accounts.getInstance().createAcount("aaa", "bbb", "c"); + Accounts.getInstance(); + initDummy(); start(10000); System.out.println("pass"); } - + @Override public void run() { System.out.println("�^�X�N�����s"); @@ -36,4 +41,18 @@ public void start(int interval) { task.scheduleWithFixedDelay(this, interval, interval, TimeUnit.MILLISECONDS); } + + private void initDummy() { + Accounts.getInstance().createAcount("test", "test", "test"); + Instances.getInstance().getInstances().put("test1", new Instance("test1", 0)); + Instances.getInstance().getInstances().put("test2", new Instance("test2", 1)); + String accountUri = "/CactusServer/rest/accounts/" + + Accounts.getInstance().getAccountByID("test").getUniqueID(); + Character chara1 = new Character("test1", accountUri, "chara1", new Position3D(), new Quaternion3D(), 0); + Character chara2 = new Character("test2", accountUri, "chara2", new Position3D(), new Quaternion3D(), 0); + Instances.getInstance().getInstance("test1").getCharacters().put("chara1", chara1); + Instances.getInstance().getInstance("test1").getCharacters().put("chara2", chara2); + Instances.getInstance().getInstance("test2").getCharacters().put("chara1", chara1); + Instances.getInstance().getInstance("test2").getCharacters().put("chara2", chara2); + } } \ No newline at end of file