コード例 #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);
        }
コード例 #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();
        }
コード例 #3
0
 public void onBlockLeave(Vector3 blockCoord, Entity e)
 {
     this.mIslandLoaded.getBlock(blockCoord, false).onBlockLeave(e, blockCoord);
 }
コード例 #4
0
 public List <Character> getNearbyPlayers(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 public Character getNearestPlayer(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public Entity getNearestEntity(Vector3 position, Entity ignore, int range)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 public Entity getNearestEntity(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #8
0
 public List <Entity> getNearbyEntities(Vector3 position, Entity ignore, int range)
 {
     throw new NotImplementedException();
 }
コード例 #9
0
 public List <Entity> getNearbyEntities(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #10
0
 public void onBlockLeave(Vector3 blockCoord, Entity e)
 {
     this.mIslandLoaded.getBlock(blockCoord, false).onBlockLeave(e, blockCoord);
 }
コード例 #11
0
ファイル: MainWorld.cs プロジェクト: RenaudWasTaken/SkyLands
        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);
        }
コード例 #12
0
 public Entity getNearestEntity(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #13
0
 public Character getNearestPlayer(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #14
0
 public Entity getNearestEntity(Vector3 position, Entity ignore, int range)
 {
     throw new NotImplementedException();
 }
コード例 #15
0
 public List<Character> getNearbyPlayers(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #16
0
 public List<Entity> getNearbyEntities(Entity entity, int range)
 {
     throw new NotImplementedException();
 }
コード例 #17
0
 public List<Entity> getNearbyEntities(Vector3 position, Entity ignore, int range)
 {
     throw new NotImplementedException();
 }
コード例 #18
0
ファイル: MainWorld.cs プロジェクト: RenaudWasTaken/SkyLands
        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();
        }
コード例 #19
0
 public void save(Entity e)
 {
     e.getIsland().save();
 }
コード例 #20
0
 public void save(Entity e)
 {
     e.getIsland().save();
 }