Esempio n. 1
0
        public void GetForces(ColliderCategory2D category, ref List <AForce> compatibleForces)
        {
            compatibleForces.Clear();

            foreach (var force in this.forces)
            {
                if ((force.IsEnabled) && ((force.Category & category) > 0))
                {
                    compatibleForces.Add(force);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Set default values
        /// </summary>
        protected override void DefaultValues()
        {
            base.DefaultValues();

            ////this.ShapeType = ShapeType.Point;

            this.LayerId           = DefaultLayers.Additive;
            this.emitType          = EmitType.Rate;
            this.emitDuration      = 0;
            this.emitAutomatically = true;
            this.EmitRate          = 100;
            this.MaxParticles      = 1000;
            this.InitColor         = Color.White;
            this.InitLife          = 1;
            this.InitSpeed         = 1;
            this.InitSize          = 0.1f;
            this.ForcesCategory    = ColliderCategory2D.Cat1;
            this.Space             = SpaceEnum.World;
            this.LifeFactor        = 1;
            this.TimeFactor        = 1;
        }