fCraft.World.EnableFireworkPhysics C# (CSharp) Method

EnableFireworkPhysics() public method

public EnableFireworkPhysics ( Player player, bool announce ) : void
player Player
announce bool
return void
        public void EnableFireworkPhysics( Player player, bool announce )
        {
            try {
                if ( fireworkPhysics == true ) {
                    player.Message( "&WAlready enabled on this world" );
                    return;
                }
                CheckIfPhysicsStarted();
                fireworkPhysics = true;
                if ( announce )
                    Server.Message( "{0}&S enabled Firework Physics on {1}", player.ClassyName, ClassyName );
            } catch ( Exception e ) {
                Logger.Log( LogType.Error, "PhyStartFireworkPhysics: " + e );
            }
        }

Usage Example

Example #1
0
        public static void LoadOtherSettings(XElement el, World world)
        {
            XAttribute temp;

            if ((temp = el.Attribute("sandPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnableSandPhysics(Player.Console, false);
                }
            }
            if ((temp = el.Attribute("fireworkPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnableFireworkPhysics(Player.Console, false);
                }
            }
            if ((temp = el.Attribute("gunPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnableGunPhysics(Player.Console, false);
                }
            }
        }
All Usage Examples Of fCraft.World::EnableFireworkPhysics