Beispiel #1
0
        // ano - TODO probably a bad idea to let lua access? let's think about this

        /*
         * // This joins the line with another line
         * // This line will be disposed
         * // Returns false when the operation could not be completed
         * public bool Join(LuaLinedef other)
         * {
         *  if (linedef.IsDisposed || other.linedef.IsDisposed)
         *  {
         *      throw new ScriptRuntimeException("Linedef has been disposed, can't Split.");
         *  }
         *  return linedef.Join(other.linedef);
         * }
         */

        // used to swap indices sort of
        public void SwapProperties(LuaLinedef other)
        {
            if (linedef.IsDisposed)
            {
                throw new ScriptRuntimeException("Linedef has been disposed, can't SwapProperties.");
            }
            if (other == null)
            {
                throw new ScriptRuntimeException("Other linedef is null, can't SwapProperties (not enough arguments maybe?).");
            }
            if (other.linedef.IsDisposed)
            {
                throw new ScriptRuntimeException("Other linedef has been disposed, can't SwapProperties.");
            }

            linedef.SwapProperties(other.linedef);
        }