public void onBlockEnter(Vector3 blockCoord, Entity e) { if (d.ContainsKey(blockCoord)) { foreach (string s in d[blockCoord]) { new Script.Parser(this.mStateMgr).Parse(s); } } if (blockCoord.y >= 200) { if (n == null) { n = ParticleGenerator.mkParticle(this.mStateMgr.SceneMgr, Vector3.NEGATIVE_UNIT_Y * 250, "Snow", e.getNode()); } } else if (n != null) { this.getSceneMgr().DestroyParticleSystem((ParticleSystem)n.GetAttachedObject(0)); n.RemoveAndDestroyAllChildren(); this.getSceneMgr().DestroySceneNode(n); n = null; } this.mIslandLoaded.getBlock(blockCoord, false).onBlockEnter(e, blockCoord); }
public void save(Entity e) { var playerFileName = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\SkyLands\\" + this.getName() + "-player" + ".sav"; DirectoryInfo directoryInfo = new FileInfo(playerFileName).Directory; if (directoryInfo != null) { directoryInfo.Create(); } using (TextWriter writer = new StreamWriter(playerFileName)) { writer.WriteLine(e.getIsland().getBiome().getId()); writer.WriteLine(e.getPosition().x); writer.WriteLine(e.getPosition().y); writer.WriteLine(e.getPosition().z); } e.getIsland().save(); }
public void onBlockLeave(Vector3 blockCoord, Entity e) { this.mIslandLoaded.getBlock(blockCoord, false).onBlockLeave(e, blockCoord); }
public List <Character> getNearbyPlayers(Entity entity, int range) { throw new NotImplementedException(); }
public Character getNearestPlayer(Entity entity, int range) { throw new NotImplementedException(); }
public Entity getNearestEntity(Vector3 position, Entity ignore, int range) { throw new NotImplementedException(); }
public Entity getNearestEntity(Entity entity, int range) { throw new NotImplementedException(); }
public List <Entity> getNearbyEntities(Vector3 position, Entity ignore, int range) { throw new NotImplementedException(); }
public List <Entity> getNearbyEntities(Entity entity, int range) { throw new NotImplementedException(); }
public void onBlockEnter(Vector3 blockCoord, Entity e) { if(d.ContainsKey(blockCoord)) { foreach(string s in d[blockCoord]) { new Script.Parser(this.mStateMgr).Parse(s); } } if (blockCoord.y >= 200) { if (n == null) { n = ParticleGenerator.mkParticle(this.mStateMgr.SceneMgr, Vector3.NEGATIVE_UNIT_Y * 250, "Snow", e.getNode()); } } else if(n != null) { this.getSceneMgr().DestroyParticleSystem((ParticleSystem)n.GetAttachedObject(0)); n.RemoveAndDestroyAllChildren(); this.getSceneMgr().DestroySceneNode(n); n = null; } this.mIslandLoaded.getBlock(blockCoord, false).onBlockEnter(e, blockCoord); }
public List<Character> getNearbyPlayers(Entity entity, int range) { throw new NotImplementedException(); }
public List<Entity> getNearbyEntities(Entity entity, int range) { throw new NotImplementedException(); }
public List<Entity> getNearbyEntities(Vector3 position, Entity ignore, int range) { throw new NotImplementedException(); }
public void save(Entity e) { var playerFileName = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\SkyLands\\" + this.getName() + "-player" + ".sav"; DirectoryInfo directoryInfo = new FileInfo(playerFileName).Directory; if (directoryInfo != null) { directoryInfo.Create(); } using(TextWriter writer = new StreamWriter(playerFileName)) { writer.WriteLine(e.getIsland().getBiome().getId()); writer.WriteLine(e.getPosition().x); writer.WriteLine(e.getPosition().y); writer.WriteLine(e.getPosition().z); } e.getIsland().save(); }
public void save(Entity e) { e.getIsland().save(); }