当前位置: 首页>>代码示例>>C#>>正文


C# SMP.World类代码示例

本文整理汇总了C#中SMP.World的典型用法代码示例。如果您正苦于以下问题:C# World类的具体用法?C# World怎么用?C# World使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


World类属于SMP命名空间,在下文中一共展示了World类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Server

        public Server()
        {
            Log("Starting Server");
            s = this;
            consolePlayer = new ConsolePlayer(s);
            consolePlayer.SetUsername(ConsoleName);
            //Group.DefaultGroup = new DefaultGroup(); //debugging
            mainlevel = new World(0, 127, 0, "main", new Random().Next());
            World.worlds.Add(mainlevel);
            ml = new MainLoop("server");
            #region updatetimer
            ml.Queue(delegate
            {
                updateTimer.Elapsed += delegate
                {
                Player.GlobalUpdate();
                }; updateTimer.Start();
            });
            #endregion
            //TODO AI Update Timer

            //Setup();

            Log("Server Started");

            //new Creeper(new Point3(0, 0, 0), mainlevel);
        }
开发者ID:jamesphenry,项目名称:ForgeCraft,代码行数:27,代码来源:Server.cs

示例2: Item

 public Item(Items item, World l, bool inv = false)
 {
     isInventory = inv;
     e = new Entity(this, l);
     this.id = (short)item;
     OnGround = false;
 }
开发者ID:Shade2010,项目名称:ForgeCraft,代码行数:7,代码来源:Item.cs

示例3: ChunkLoadQueue

 public ChunkLoadQueue(int x, int z, bool unload, World world)
 {
     this.x = x;
     this.z = z;
     this.unload = unload;
     this.world = world;
 }
开发者ID:eszanto8,项目名称:ForgeCraft,代码行数:7,代码来源:Chunker.cs

示例4: Use

 public override void Use(Player p, params string[] args)
 {
     if (args.Length == 0) { Help(p); return; }
     else if (args.Length == 1)
     {
         Random rand = new Random();
         int seed = new Random().Next();
         p.SendMessage("Creating world with seed: " + seed);
         double x = 0; double y = 127; double z = 0;
         World temp = new World(x, y, z, args[0], seed);
         //while (Chunk.GetChunk((int)x, (int)z, temp).GetBlock((int)x, (int)(y - 1), (int)z) == 0)
         //	y--;
         temp.SpawnY = y;
         World.worlds.Add(temp);
         p.SendMessage("World " + args[0] + " MADE!");
     }
     else if (args.Length == 2 || args.Length == 3)
     {
         int seed = Convert.ToInt32(args[1]);
         p.SendMessage("Creating world with seed: " + seed);
         double x = 0; double y = 127; double z = 0;
         World temp = new World(x, y, z, args[0], seed);
         if (args.Length == 3)
         {
             int limit = Convert.ToInt32(args[2]);
             if (limit > 2)
                 temp.ChunkLimit = limit;
             else { p.SendMessage("maxchunks cannot be less than 3. creating with maxchunks 3."); temp.ChunkLimit = 3; }
         }
         World.worlds.Add(temp);
         p.SendMessage("World " + args[0] + " MADE!");
     }
 }
开发者ID:RevolutionSmythe,项目名称:ForgeCraft,代码行数:33,代码来源:CmdNewLVL.cs

示例5: Physics

 public Physics(World w, PSetting setting, int speed)
 {
     this.w = w;
     this.setting = setting;
     this.speed = speed;
     this.random = new Random();
 }
开发者ID:Shade2010,项目名称:ForgeCraft,代码行数:7,代码来源:Physics.cs

示例6: Creeper

        public Creeper(Point3 pos, World level)
        {
            mye = new Entity(this, level);
            mylevel = level;
            e.pos = pos;

            e.UpdateChunks(false, false);
        }
开发者ID:TaFinalDestination,项目名称:ForgeCraft,代码行数:8,代码来源:Creeper.cs

示例7: ContainerChest

 public ContainerChest(World level, Point3 point)
 {
     this.level = level;
     this.point = point;
     items = new Item[Size];
     for (int i = 0; i < Size; i++)
         items[i] = Item.Nothing;
 }
开发者ID:TaFinalDestination,项目名称:ForgeCraft,代码行数:8,代码来源:ContainerChest.cs

示例8: ChunkGenQueue

 public ChunkGenQueue(int x, int z, World world, bool generate = true, bool populate = true)
 {
     this.generate = generate;
     this.populate = populate;
     this.x = x;
     this.z = z;
     this.world = world;
 }
开发者ID:Cazzar,项目名称:ForgeCraft,代码行数:8,代码来源:Chunker.cs

示例9: Item

 public Item(short item, byte count, short meta, World l)
 {
     this.item = (short)item;
     this.meta = meta;
     this.count = count;
     OnGround = false;
     e = new Entity(this, l);
 }
开发者ID:jamesphenry,项目名称:ForgeCraft,代码行数:8,代码来源:Item.cs

示例10: WorldChunkManager

 public WorldChunkManager(World world)
     : this()
 {
     GenLayer[] agenlayer = GenLayer.func_35019_a(world.seed);
     field_34907_a = agenlayer[0];
     field_34906_b = agenlayer[1];
     temperatureLayer = agenlayer[2];
     rainfallLayer = agenlayer[3];
 }
开发者ID:Nerketur,项目名称:ForgeCraft,代码行数:9,代码来源:WorldChunkManager.cs

示例11: Entity

        public Entity(AI ai, World l)
        {
            this.ai = ai;
            id = FreeId();
            isAI = true;
            level = l;

            Entities.Add(id, this);
        }
开发者ID:ProLoks,项目名称:ForgeCraft,代码行数:9,代码来源:Entity.cs

示例12: Entity

        public Entity(Player pl, World l)
            : this(l)
        {
            p = pl;
            isPlayer = true;

            UpdateChunks(false, false);

            Entities.Add(id, this);
        }
开发者ID:Cazzar,项目名称:ForgeCraft,代码行数:10,代码来源:Entity.cs

示例13: Item

 public Item(short item, byte count, short meta, World l, double[] pos, byte[] rot)
 {
     this.item = item;
     this.count = count;
     this.meta = meta;
     this.level = l;
     this.pos = pos;
     this.rot = rot;
     OnGround = true;
     e = new Entity(this, l);
     e.UpdateChunks(false, false);
 }
开发者ID:ProLoks,项目名称:ForgeCraft,代码行数:12,代码来源:Item.cs

示例14: Explosion

 public Explosion(World world, /*Entity entity,*/ double d, double d1, double d2, float f)
 {
     isFlaming = false;
     ExplosionRNG = new Random();
     destroyedBlockPositions = new HashSet<Point3>();
     worldObj = world;
     //exploder = entity; // Not needed right now
     explosionSize = f;
     explosionX = d;
     explosionY = d1;
     explosionZ = d2;
 }
开发者ID:eszanto8,项目名称:ForgeCraft,代码行数:12,代码来源:Explosion.cs

示例15: Entity

        public Entity(Item i, World l)
        {
            I = i;
            if (!I.isInventory) id = FreeId();
            isItem = true;
            level = l;

            if (!I.isInventory)
            {
                UpdateChunks(false, false);
                Entities.Add(id, this);
            }
        }
开发者ID:Shade2010,项目名称:ForgeCraft,代码行数:13,代码来源:Entity.cs


注:本文中的SMP.World类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。