Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
 }
Beispiel #4
0
 public List <Character> getNearbyPlayers(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 public Character getNearestPlayer(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
Beispiel #6
0
 public Entity getNearestEntity(Vector3 position, Entity ignore, int range)
 {
     throw new NotImplementedException();
 }
Beispiel #7
0
 public Entity getNearestEntity(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
Beispiel #8
0
 public List <Entity> getNearbyEntities(Vector3 position, Entity ignore, int range)
 {
     throw new NotImplementedException();
 }
Beispiel #9
0
 public List <Entity> getNearbyEntities(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
Beispiel #10
0
 public void onBlockLeave(Vector3 blockCoord, Entity e)
 {
     this.mIslandLoaded.getBlock(blockCoord, false).onBlockLeave(e, blockCoord);
 }
Beispiel #11
0
        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 Entity getNearestEntity(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 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();
 }
Beispiel #18
0
        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();
 }
Beispiel #20
0
 public void save(Entity e)
 {
     e.getIsland().save();
 }