protected void addDrawjob(DrawJob drawJob) { _screen.addDrawjob(drawJob); Sprite sprite = drawJob.sprite; if (sprite.flashable) { DrawJob flashJob = new DrawJob(sprite, drawJob.position, drawJob.side, drawJob.drawingY + 1, _stateTimer/_stateTime); _screen.addDrawjob(flashJob); } }
protected void addDrawjob(DrawJob drawJob, bool flicker) { if (!flicker) addDrawjob(drawJob); else { Sprite sprite = drawJob.sprite; DrawJob flickerJob = new DrawJob(sprite, drawJob.position, drawJob.side, drawJob.drawingY + 1, true, 500f); _screen.addDrawjob(flickerJob); } }
public void addDrawjob(DrawJob dj) { for (int i = 0; i < _drawJobs.Count; i++) { if (dj.drawingY < ((DrawJob)_drawJobs[i]).drawingY) { _drawJobs.Insert(i, dj); return; } } _drawJobs.Add(dj); }