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)); }
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 Block(Blockmap blockmap) { if (blockmap == null) throw new ArgumentNullException("blockmap"); this.blockmap = blockmap; this.firstactor = null; this.linedefs = new List<Linedef>(); }
public Actor(World world) : base(world) { this.linked = false; this.block = null; this.nextinblock = null; this.previnblock = null; // TODO :: x // TODO :: y // TODO :: z // TODO :: angle // TODO :: spritenum // TODO :: spriteframe // TODO :: radius // TODO :: height // TODO :: xmomentum // TODO :: ymomentum // TODO :: zmomentum // TODO :: ticks // TODO :: statenum // TODO :: special // TODO :: solid // TODO :: shootable // TODO :: nosector // TODO :: noblockmap // TODO :: ambush // TODO :: justhit // TODO :: justattacked // TODO :: spawnceiling // TODO :: nogravity // TODO :: dropoff // TODO :: pickup // TODO :: noclip // TODO :: slide // TODO :: float // TODO :: teleport // TODO :: missile // TODO :: dropped // TODO :: shadow // TODO :: noblood // TODO :: corpse // TODO :: infloat // TODO :: countkill // TODO :: countitem // TODO :: skullfly // TODO :: notdmatch // TODO :: health // TODO :: movementdirection // TODO :: movementcount // TODO :: target // TODO :: reactiontime // TODO :: lastlook // TODO :: tracer this.speed = Fixed.Zero; this.mass = 100; this.damage = 0; this.painchance = 0; this.seesoundnum = 0; this.activesoundnum = 0; this.attacksoundnum = 0; this.painsoundnum = 0; this.deathsoundnum = 0; this.species = GetType(); this.states = new Dictionary<string,int>(); DefineState("Spawn",0); }
public void Link() { if (linked) throw new InvalidOperationException(); linked = true; LinkSubsector(); if (!nosector) LinkSector(); if (!noblockmap) { int blockx = (x - World.Blockmap.XOffset).IntValue / 128; int blocky = (y - World.Blockmap.YOffset).IntValue / 128; if (blockx >= 0 && blockx < World.Blockmap.Width && blocky >= 0 && blocky < World.Blockmap.Height) { block = World.Blockmap[blockx,blocky]; nextinblock = block.FirstActor; previnblock = null; if (nextinblock != null) nextinblock.previnblock = this; block.FirstActor = this; } } }
public ScriptSpecialEnvironment(World world,Actor activator) : base(world) { // Activator can be null this.activator = activator; }
public ScriptSpecialEnvironment(ScriptSpecialEnvironment environment) : base(environment) { if (environment == null) throw new ArgumentNullException("environment"); this.activator = environment.activator; }