コード例 #1
0
ファイル: Particle.cs プロジェクト: Czahyl/MOBA
        public Particle(ParticleEngine engine, Vector2 startPos, ParticlePreset preset)
        {
            e = engine;
            settings = preset;
            pos = startPos;
            dir = PickRandomDirection();
            vel = Main.random.Next(settings.minVel, settings.maxVel);

            liveTime = settings.liveTime;
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: Czahyl/MOBA
        protected override void Initialize()
        {
            particles = new ParticleEngine(this);
            Assets = new AssetManager();
            Trig = new Math.Trig();
            random = new Random();
            map = new Map(this);

            Cam = new Camera(new Viewport(0, 0, WIDTH, HEIGHT));

            lightEngine = new LightEngine(this, WIDTH, HEIGHT);

            particles.presets.Add("Fire", new ParticlePreset(10, 3, 4, new Math.Timer(5, true), (float)System.Math.PI * 4));

            base.Initialize();
        }