Ejemplo n.º 1
0
        public Particle(EntityState stateref, IComponent parent, int index, Vector2 position, int ttl, Emitter e)
            : base(stateref, parent, e.Name + ".Particle")
        {
            Name = Name + Id;

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

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

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

            Emitter = e;
            TimeToLive = ttl;
            MaxTimeToLive = TimeToLive;
        }
Ejemplo n.º 2
0
 public FadeParticle(EntityState stateref, IComponent parent, int index, Vector2 position, int fadeage, int ttl, Emitter e)
     : base(stateref, parent, index, position, ttl, e)
 {
     FadeAge = fadeage;
 }