Beispiel #1
0
        /// <summary>
        /// Returns an unitialised deep copy of the Emitter.
        /// </summary>
        /// <returns>A deep copy of the Emitter.</returns>
        public override Emitter DeepCopy()
        {
            Emitter copy = new RectEmitter
            {
                Frame    = this.Frame,
                Height   = this.Height,
                Rotation = this.Rotation,
                Width    = this.Width
            };

            base.CopyBaseFields(copy);

            return(copy);
        }
Beispiel #2
0
        public override void Initialize()
        {
            Renderer = new SpriteBatchRenderer {BlendMode = SpriteBlendMode.Additive, Batch = CurrGame.SpriteBatch};

            //TowerSelector = CurrGame.Content.Load<RectEmitter>("GUI/TowerSelector");
            TowerSelector = new RectEmitter
                            {
                                ReleaseColour = Color.Lime.ToVector3(),
                                ReleaseOpacity = 1,
                                ReleaseQuantity = 100,
                                ReleaseScale = new VariableFloat {Anchor = 15, Variation = 1},
                                ReleaseSpeed = new VariableFloat {Anchor = 10, Variation = 5},
                                Frame = true,
                                Height = 50,
                                Width = 50,
                                Budget = 10000,
                                Term = 0.5f
                            };

            TowerSelector.Initialize();
            TowerSelector.LoadContent(CurrGame.Content);
            base.Initialize();
        }
        /// <summary>
        /// Returns an unitialised deep copy of the Emitter.
        /// </summary>
        /// <returns>A deep copy of the Emitter.</returns>
        public override Emitter DeepCopy()
        {
            Emitter copy = new RectEmitter
            {
                Frame = this.Frame,
                Height = this.Height,
                Rotation = this.Rotation,
                Width = this.Width
            };

            base.CopyBaseFields(copy);

            return copy;
        }