Esempio n. 1
0
        public ParticleInit(ParticleType type, CPos position, int height)
        {
            Type     = type;
            Position = position;
            Height   = height;

            // Empty list
            Nodes = new List <TextNode>();
        }
Esempio n. 2
0
        public ParticleInit(List <TextNode> nodes)
        {
            fromSave = true;

            Nodes = nodes;

            Type     = Convert <ParticleType>("Type", null);
            Position = Convert("Position", CPos.Zero);
            Height   = Convert("Height", 0);
        }
Esempio n. 3
0
        public Particle(World world, ParticleInit init) : base(init.Position, init.Type.GetRenderable())
        {
            this.world = world;
            Type       = init.Type;

            Height = init.Height;

            current  = init.Convert("Duration", Type.Duration);
            dissolve = init.Convert("DissolveDuration", Type.DissolveDuration);

            velocity        = init.Convert("Velocity", ParticleUtils.Variety(Type.RandomVelocity));
            rotate_velocity = init.Convert("RotationVelocity", ParticleUtils.AngleVariety(Type.RandomRotation));

            // Set invisible first and check later for visibility
            Visible = false;
        }
Esempio n. 4
0
        public static Particle Create(World world, ParticleType type, CPos position, int height)
        {
            var init = new ParticleInit(type, position, height);

            return(new Particle(world, init));
        }