コード例 #1
0
        public Particle(int index, Vector2 position, int ttl, Emitter e)
            : base(e.Entity.StateRef, e.Name + ".Particle")
        {
            Name = Name + ID;

            Body = new Body(this, "Body", position);
            AddComponent(Body);

            TileRender = new TileRender(this, "TileRender", e.Texture, e.TileSize);
            TileRender.Index = index;
            AddComponent(TileRender);

            Physics = new Physics(this, "Physics");
            AddComponent(Physics);

            Emitter = e;
            TimeToLive = ttl;
            MaxTimeToLive = TimeToLive;
        }
コード例 #2
0
 public GibParticle(int index, Vector2 position, int ttl, Emitter e)
     : base(index, position, ttl, e)
 {
 }
コード例 #3
0
 public FadeParticle(int index, Vector2 position, int fadeage, int ttl, Emitter e)
     : base(index, position, ttl, e)
 {
     FadeAge = fadeage;
 }
コード例 #4
0
 public ExplosionParticle(int index, Vector2 position, int ttl, Emitter e)
     : base(index,position,10,ttl,e)
 {
 }