public CopSpawner(World world, McgLayer layer, Vector2 location, TimeSpan spawnRate, SpriteBasis copSpriteBasis, SpriteBasis bulletSpriteBasis, Vector2 playerPosition, int spawnRateFuzzMillis = 0) { this.layer = layer; this.world = world; this.spawnRate = spawnRate; this.location = location; this.copSpriteBasis = copSpriteBasis; this.spawnRateFuzzMillis = spawnRateFuzzMillis; this.playerPosition = playerPosition; this.bulletSpriteBasis = bulletSpriteBasis; }
public CopController( World w, Vector2 r0, CopSprite sprite, McgLayer bulletLayer, SpriteBasis bulletSpriteBasis, Vector2 playerPosition ) { _world = w; this.bulletLayer = bulletLayer; _fsBody = w.NewBody(); _fsBody.BodyType = BodyType.Dynamic; _fsBody.Position = r0; copSprite = sprite; MakeLivingFixture(); shootTimer = TimeSpan.FromSeconds(VERGEGame.rand.Next(3, 10)); this.bulletSpriteBasis = bulletSpriteBasis; this.playerPosition = playerPosition; }
public McgNode( RenderDelegate act, McgLayer l, int start_x, int start_y, int? end_x, int? end_y, int? delay) { OnDraw = act; _Node( l, start_x, start_y, end_x, end_y, delay ); }
public McgNode(RenderDelegate act, McgLayer l, int start_x, int start_y) : this(act, l, start_x, start_y, null, null, null) { }
public McgNode( Sprite s, McgLayer l, int start_x, int start_y, int? end_x, int? end_y, int? delay ) { sprite = s; s.visible = true; _Node( l, start_x, start_y, end_x, end_y, delay ); }
public McgNode( Sprite s, McgLayer l, int start_x, int start_y ) : this(s, l, start_x, start_y, null, null, null) { }
public McgNode( Texture2D im, Rectangle bounds, McgLayer l, int start_x, int start_y, int? end_x, int? end_y, int? delay) { image = im; im_bounds = bounds; _Node( l, start_x, start_y, end_x, end_y, delay ); }
public McgNode(Texture2D im, Rectangle bounds, McgLayer l, int start_x, int start_y) : this(im, bounds, l, start_x, start_y, null, null, null) { }
public McgLayer AddLayer( string name ) { McgLayer l = new McgLayer(this, name); layers.Add( l ); return l; }
private void _Node( McgLayer l, int start_x, int start_y, int? end_x, int? end_y, int? delay) { layer = l; this.start_x = start_x; this.start_y = start_y; if( end_x == null ) { cur_x = final_x = start_x; cur_y = final_y = start_y; tick_y = tick_x = delay = final_time = null; isMoving = false; } else { /* cur_x = start_x; cur_y = start_y; final_x = (float)end_x; final_y = (float)end_y; this.delay = delay; tick_x = ( final_x - cur_x ) / (float)delay; tick_y = ( final_y - cur_y ) / (float)delay; final_time = layer.stack.systime + delay; isMoving = true; */ SetNewMovement( start_x, start_y, end_x.Value, end_y.Value, delay.Value ); } }
private void _Node( McgLayer l, int start_x, int start_y ) { _Node(l, start_x, start_y); }
public McgNode( IDrawableThing d, McgLayer l, int start_x, int start_y ) { _idt = d; _Node( l, start_x, start_y, start_x, start_y, 0 ); }
public McgNode( Texture2D im, Rectangle? bounds, McgLayer l, int start_x, int start_y, int? end_x, int? end_y, int? delay ) { image = im; if( bounds == null ) { im_bounds = new Rectangle( start_x, start_y, im.Width, im.Height ); } else { im_bounds = bounds.Value; } _Node( l, start_x, start_y, end_x, end_y, delay ); }