public FlatRedBall.Math.Geometry.AxisAlignedRectangle ToAxisAlignedRectangle()
        {
            FlatRedBall.Math.Geometry.AxisAlignedRectangle rectangle = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();

            rectangle.X = this.X;
            rectangle.Y = this.Y;
            rectangle.Z = this.Z;

            rectangle.ScaleX = this.ScaleX;
            rectangle.ScaleY = this.ScaleY;

            rectangle.Color =
#if FRB_MDX
                Color.FromArgb(
                (int)(Alpha * 255),
                (int)(Red * 255),
                (int)(Green * 255),
                (int)(Blue * 255));
#else
                new Color(
                    (byte)(Red * 255),
                    (byte)(Green * 255),
                    (byte)(Blue * 255),
                    (byte)(Alpha * 255));
#endif

            rectangle.Name = this.Name;

            return rectangle;

        }
示例#2
0
        // This class does not support visibility.
        // The reason is because setting visibility
        // on a AxisAlignedRectangle (which would occur
        // in the ToAxisAlignedRectangle method) would add
        // it to the manager.  We can't do that because the ToRuntime
        // methods should not add the object to any manager.  Maybe we'll
        // fix this at some point in the future.
        //public bool Visible;
        //public bool ShouldSerializeVisible()
        //{
        //    return Visible == false;
        //}

        #endregion

        public static AxisAlignedRectangleSave FromAxisAlignedRectangle(FlatRedBall.Math.Geometry.AxisAlignedRectangle rectangle)
        {
            AxisAlignedRectangleSave aars = new AxisAlignedRectangleSave();

            aars.SetFrom(rectangle);

            return(aars);
        }
示例#3
0
		protected override void InitializeEntity(bool addToManagers)
		{
			// Generated Initialize
			LoadStaticContent(ContentManagerName);
			Sprite = SceneFile.Sprites.FindByName("feto png 64 x 64 intocable!1").Clone();
			Cuerpo = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();
			Cuerpo.Name = "Cuerpo";
			
			base.InitializeEntity(addToManagers);


		}
示例#4
0
        protected virtual void InitializeEntity(bool addToManagers)
        {
            LoadStaticContent(ContentManagerName);
            SpriteInstance                     = new FlatRedBall.Sprite();
            SpriteInstance.Name                = "SpriteInstance";
            mAxisAlignedRectangleInstance      = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();
            mAxisAlignedRectangleInstance.Name = "mAxisAlignedRectangleInstance";

            PostInitialize();
            if (addToManagers)
            {
                AddToManagers(null);
            }
        }
示例#5
0
		protected virtual void InitializeEntity(bool addToManagers)
		{
			// Generated Initialize
			LoadStaticContent(ContentManagerName);
			Sprite = SceneFile.Sprites.FindByName("moneda 1 moneda png 64 x 64 intocable!1").Clone();
			Cuerpo = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();
			Cuerpo.Name = "Cuerpo";
			
			PostInitialize();
			if (addToManagers)
			{
				AddToManagers(null);
			}


		}
示例#6
0
        public void SetFrom(FlatRedBall.Math.Geometry.AxisAlignedRectangle rectangle)
        {
            X = rectangle.X;
            Y = rectangle.Y;
            Z = rectangle.Z;

            ScaleX = rectangle.ScaleX;
            ScaleY = rectangle.ScaleY;

            Name = rectangle.Name;

            Alpha = rectangle.Color.A / 255.0f;
            Red   = rectangle.Color.R / 255.0f;
            Green = rectangle.Color.G / 255.0f;
            Blue  = rectangle.Color.B / 255.0f;
            if (rectangle.Parent != null)
            {
                Parent = rectangle.Parent.Name;
            }
        }
示例#7
0
        public FlatRedBall.Math.Geometry.AxisAlignedRectangle ToAxisAlignedRectangle()
        {
            FlatRedBall.Math.Geometry.AxisAlignedRectangle rectangle = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();

            rectangle.X = this.X;
            rectangle.Y = this.Y;
            rectangle.Z = this.Z;

            rectangle.ScaleX = this.ScaleX;
            rectangle.ScaleY = this.ScaleY;

            rectangle.Color =
                new Color(
                    (byte)(Red * 255),
                    (byte)(Green * 255),
                    (byte)(Blue * 255),
                    (byte)(Alpha * 255));

            rectangle.Name = this.Name;

            return(rectangle);
        }
示例#8
0
		protected override void InitializeEntity(bool addToManagers)
		{
			// Generated Initialize
			LoadStaticContent(ContentManagerName);
			Cuerpo = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();
			Cuerpo.Name = "Cuerpo";
			Sprite = SceneFile.Sprites.FindByName("keynes 131").Clone();
			Shield = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();
			Shield.Name = "Shield";
			mListaAtaques = new FlatRedBall.Math.PositionedObjectList<TesisEconoFight.Entities.Especial>();
			mListaAtaques.Name = "mListaAtaques";
			Golpe = new FlatRedBall.Math.Geometry.AxisAlignedRectangle();
			Golpe.Name = "Golpe";
			mListaAtaqueSuper = new FlatRedBall.Math.PositionedObjectList<TesisEconoFight.Entities.SuperAtaque>();
			mListaAtaqueSuper.Name = "mListaAtaqueSuper";
			
			base.InitializeEntity(addToManagers);


		}