Create() public static method

public static Create ( World world ) : FoodGenerator
world Dwarrowdelf.Server.World
return FoodGenerator
Ejemplo n.º 1
0
        public static void FinalizeEnv(EnvironmentObject env)
        {
            // Add gems to random locs
            for (int i = 0; i < 6; ++i)
            {
                CreateItem(env, ItemID.Gem, GetRandomMaterial(MaterialCategory.Gem), env.GetRandomEnterableSurfaceLocation());
            }

            // Add rocks to random locs
            for (int i = 0; i < 6; ++i)
            {
                CreateItem(env, ItemID.Rock, GetRandomMaterial(MaterialCategory.Rock), env.GetRandomEnterableSurfaceLocation());
            }

            CreateWorkbenches(env);

            CreateStartItems(env);
            CreateDebugItems(env);

            {
                var gen = FoodGenerator.Create(env.World);
                gen.MoveToMustSucceed(env, env.GetSurfaceLocation(env.Width / 2 - 2, env.Height / 2 - 2));
            }

            AddMonsters(env);
        }