コード例 #1
0
ファイル: Emitter.cs プロジェクト: ChocMaltHoney/Neuroleptic
        //!---CONSTRCUTOR---!
        public Emitter(Emitter other)
        {
            //  Defaults
            fEmittedTime = other.fEmittedTime;
            tTexture = other.tTexture;
            v2Position = other.v2Position;
            lParticles = new List<Particle>();

            // PARTICLE
            //-----------------------------------------------------------------
            fAlpha = other.fAlpha;                                  //  Starting Alpha of the particle
            fAlphaVar = other.fAlphaVar;
            fAlphaFinish = other.fAlphaFinish;
            fDrag = other.fDrag;                                    //  How much Drag the particle is affected by
            fDuration = other.fDuration;                            //  How long the Emitter emits for
            fForce = other.fForce;                                  //  Initial Force
            fForceVar = other.fForceVar;                            //  Mamimum variation of the initial Force
            fGravity = other.fGravity;                              //  How much Gravity the particle is affected by
            fLife = other.fLife;                                    //  Starting Life of the Particle   (Seconds)
            fLifeVar = other.fLifeVar;                              //  Maximum random variation of the Starting Life of the Particle   (Seconds)
            fRate = other.fRate;                                    //  How many particles are spawned (per second?) (should not exceed fDuration * 1000)
            fSize = other.fSize;                                    //  Size of the Texture
            fSizeVar = other.fSizeVar;                              //  Maximum random variation of the Size of the Texture
            fSizeFinish = other.fSizeFinish;                        //  Size of the object when it is destroyed
            cColour = other.cColour;

            //  EMITTER
            v2DirMin = other.v2DirMin;
            v2DirMax = other.v2DirMax;
            v2SizeMin = other.v2SizeMin;
            v2SizeMax = other.v2SizeMax;
            fElapsedTime = other.fElapsedTime;
            bAttached = other.bAttached;
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: ChocMaltHoney/Neuroleptic
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            sfFont = Content.Load<SpriteFont>("Fonts/CrazyKiller");
            sfTemplate = Content.Load<SpriteFont>("Fonts/Template");
            lineTex = Content.Load<Texture2D>("pixel");
            tKey = Content.Load<Texture2D>("Menus/Key");
            Rooms.RoomManager.GenerateContent(Content);

            emitter = Particle.Emitter.Heal(Content, 2.0f);
        }
コード例 #3
0
ファイル: Emitter.cs プロジェクト: ChocMaltHoney/Neuroleptic
        public static Emitter Shield(ContentManager Content, float f_Life = 5.0f, Vector2 v2_Position = default(Vector2), String s_Tex = "pixel")
        {
            Emitter e = new Emitter(Content, v2_Position, s_Tex);

            e.fAlpha = 0.5f;        //  Starting Alpha of the particle
            e.fAlphaVar = 0.0f;     //  Maximum variation of the initial Alpha
            e.fAlphaFinish = 0.1f;  //  Alpha of the object when it is destroyed
            e.fDrag = 2000.0f;         //  How much Drag the particle is affected by
            e.fDuration = 0.05f;   //  How long the Emitter emits for
            e.fForce = 700f;        //  Initial Force
            e.fForceVar = 0.0f;     //  Mamimum variation of the initial Force
            e.fGravity = 0.0f;      //  How much Gravity the particle is affected by
            e.fLife = f_Life;         //  Starting Life of the Particle   (Seconds)
            e.fLifeVar = 0.0f;      //  Maximum random variation of the Starting Life of the Particle   (Seconds)
            e.fRate = 2000.0f;        //  How many particles are spawned (per second?) (should not exceed fDuration * 1000)
            e.fSize = 4.0f;        //  Size of the Texture
            e.fSizeVar = 0.5f;      //  Maximum random variation of the Size of the Texture
            e.fSizeFinish = 1.0f;   //  Size of the object when it is destroyed

            e.cColour = Color.LightSteelBlue;
            //-----------------------------------------------------------------

            //  EMITTER
            //-----------------------------------------------------------------
            e.v2DirMin = new Vector2(-1, -1);
            e.v2DirMax = new Vector2(1, 1);
            e.v2SizeMin = new Vector2(2, 2);
            e.v2SizeMax = new Vector2(2, 2);

            e.bAttached = true;
            return e;
            //-----------------------------------------------------------------
        }
コード例 #4
0
ファイル: Emitter.cs プロジェクト: ChocMaltHoney/Neuroleptic
        public static Emitter Trail(ContentManager Content, Vector2 v2_Position = default(Vector2), String s_Tex = "pixel")
        {
            Emitter e = new Emitter(Content, v2_Position, s_Tex);

            // CHANGE THESE VALUES TO EFFECT HOW THE EMITTER EMITTS PARTICLES
            //-----------------------------------------------------------------
            e.fAlpha = 0.5f;        //  Starting Alpha of the particle
            e.fAlphaVar = 0.0f;     //  Maximum variation of the initial Alpha
            e.fAlphaFinish = 0.0f;  //  Alpha of the object when it is destroyed
            e.fDrag = 0.0f;         //  How much Drag the particle is affected by
            e.fDuration = 0.1f;     //  How long the Emitter emits for
            e.fForce = 0.0f;        //  Initial Force
            e.fForceVar = 0.0f;     //  Mamimum variation of the initial Force
            e.fGravity = 0.0f;      //  How much Gravity the particle is affected by
            e.fLife = 0.5f;         //  Starting Life of the Particle   (Seconds)
            e.fLifeVar = 0.0f;      //  Maximum random variation of the Starting Life of the Particle   (Seconds)
            e.fRate = 100.0f;       //  How many particles are spawned (per second?) (should not exceed fDuration * 1000)
            e.fSize = 10.0f;        //  Size of the Texture
            e.fSizeVar = 0.0f;      //  Maximum random variation of the Size of the Texture
            e.fSizeFinish = 0.2f;   //  Size of the object when it is destroyed
            //-----------------------------------------------------------------

            //  EMITTER
            //-----------------------------------------------------------------
            e.v2DirMin = new Vector2(-1, -1);
            e.v2DirMax = new Vector2(1, 1);
            e.v2SizeMin = new Vector2(0, 0);
            e.v2SizeMax = new Vector2(0, 0);
            e.bAttached = false;
            //-----------------------------------------------------------------
            return e;
        }
コード例 #5
0
ファイル: Emitter.cs プロジェクト: ChocMaltHoney/Neuroleptic
        public static Emitter Explode(ContentManager Content, Vector2 v2_Position = default(Vector2), String s_Tex = "pixel")
        {
            Emitter e = new Emitter(Content, v2_Position, s_Tex);

            e.fAlpha = 0.3f;        //  Starting Alpha of the particle
            e.fAlphaVar = 0.0f;     //  Maximum variation of the initial Alpha
            e.fAlphaFinish = 0.0f;  //  Alpha of the object when it is destroyed
            e.fDrag = 1300.0f;         //  How much Drag the particle is affected by
            e.fDuration = 0.1f;   //  How long the Emitter emits for
            e.fForce = 800.0f;        //  Initial Force
            e.fForceVar = 0.0f;     //  Mamimum variation of the initial Force
            e.fGravity = 0.0f;      //  How much Gravity the particle is affected by
            e.fLife = 0.5f;         //  Starting Life of the Particle   (Seconds)
            e.fLifeVar = 0.2f;      //  Maximum random variation of the Starting Life of the Particle   (Seconds)
            e.fRate = 500.0f;        //  How many particles are spawned (per second?) (should not exceed fDuration * 1000)
            e.fSize = 8.0f;        //  Size of the Texture
            e.fSizeVar = 4.0f;      //  Maximum random variation of the Size of the Texture
            e.fSizeFinish = 1.0f;   //  Size of the object when it is destroyed
            e.cColour = new Color(160, 100, 50, 1.0f);

            //  EMITTER
            //-----------------------------------------------------------------
            e.v2DirMin = new Vector2(-1, -1);
            e.v2DirMax = new Vector2(1, 1);
            e.v2SizeMin = new Vector2(0, 0);
            e.v2SizeMax = new Vector2(8, 8);
            e.bAttached = false;
            //-----------------------------------------------------------------
            return e;
        }