public ScriptLinedefSpecialEnvironment(World world,Actor activator,Linedef linedef,bool isbackside) : base(world,activator)
 {
     if (linedef == null)
         throw new ArgumentNullException("linedef");
     this.linedef = linedef;
     this.isbackside = isbackside;
 }
 public ScriptLinedefSpecialEnvironment(ScriptLinedefSpecialEnvironment environment) : base(environment)
 {
     if (environment == null)
         throw new ArgumentNullException("environment");
     this.linedef = environment.linedef;
     this.isbackside = environment.isbackside;
 }
Beispiel #3
0
 public Seg(World world,Vertex start,Vertex end,Linedef linedef,bool isbackside,Angle angle,Fixed offset)
 {
     if (world == null)
         throw new ArgumentNullException("world");
     if (start == null)
         throw new ArgumentNullException("start");
     if (end == null)
         throw new ArgumentNullException("end");
     if (linedef == null)
         throw new ArgumentNullException("linedef");
     if (start.World != world)
         throw new ArgumentException("Start vertex is from another world.");
     if (end.World != world)
         throw new ArgumentException("End vertex is from another world.");
     if (linedef.World != world)
         throw new ArgumentException("Linedef is from another world.");
     this.world = world;
     // TODO :: start
     // TODO :: end
     // TODO :: linedef
     if (!isbackside)
     {
         this.front = linedef.Front;
         this.back = linedef.Back;
     }
     else
     {
         this.front = linedef.Back;
         this.back = linedef.Front;
     }
     // TODO :: angle
     // TODO :: offset
 }
Beispiel #4
0
 public bool Activate(Actor activator,Linedef linedef,bool isbackside)
 {
     // Activator can be null
     if (linedef == null)
         throw new ArgumentNullException("linedef");
     return handler(new ScriptLinedefSpecialEnvironment(activator.World,activator,linedef,isbackside));
 }
Beispiel #5
0
 public void AddLinedef(Linedef linedef)
 {
     if (linedef == null)
         throw new ArgumentNullException("linedef");
     if (linedef.World != blockmap.World)
         throw new ArgumentException("Linedef is from another world.");
     if (linedefs.Contains(linedef))
     {
         Core.Console.LogWarning("A linedef has been added to a block it already exists in.");
     }
     linedefs.Add(linedef);
 }