fCraft.World.EnableWaterPhysics C# (CSharp) Метод

EnableWaterPhysics() публичный Метод

public EnableWaterPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void
        public void EnableWaterPhysics( Player player, bool announce )
        {
            if ( waterPhysics == true ) {
                player.Message( "&WAlready enabled on this world" );
                return;
            }
            CheckIfPhysicsStarted();
            waterPhysics = true;
            if ( announce )
                Server.Message( "{0}&S enabled Water Physics on {1}", player.ClassyName, ClassyName );
        }

Usage Example

Пример #1
0
        public static void LoadSettings(XElement el, World world)
        {
            XAttribute temp;

            if ((temp = el.Attribute("plantPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnablePlantPhysics(Player.Console, false);
                }
            }
            if ((temp = el.Attribute("tntPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnableTNTPhysics(Player.Console, false);
                }
            }
            if ((temp = el.Attribute("waterPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnableWaterPhysics(Player.Console, false);
                }
            }
        }
All Usage Examples Of fCraft.World::EnableWaterPhysics