Exemple #1
0
 public ParticleEmitter(ParticleEmitterSettings settings)
 {
     this.settings = settings;
     spawnTimer    = new TimerTrig(settings.frequency.Random());
     particles     = new Pool <Particle>(settings.capacity);
     Reset();
 }
Exemple #2
0
 public BaseScreen(IGameContext context, string name, int virtualWidth, int virtualHeight)
 {
     this.context       = context;
     this.name          = name;
     virtualResolution  = new Resolution(virtualWidth, virtualHeight);
     transitionTimer    = new TimerTrig(0);
     TransitionDuration = 1000f;
     spriteBatch        = new SpriteBatch(context.GraphicsDevice);
     content            = new ContentManager(context.ServiceProvider, context.ContentRoot);
     State        = ScreenState.Initializing;
     tweenManager = new TweenManager();
     cam          = new Camera(new Vector2(virtualWidth / 2, virtualHeight / 2));
 }
 public FrameStepAnimation(int[] frames, float interval, string name = "")
 {
     this.frames = frames;
     trig        = new TimerTrig(interval);
     Name        = name;
 }