public FlatRedBall.Math.Geometry.Circle ToCircle() { FlatRedBall.Math.Geometry.Circle circle = new FlatRedBall.Math.Geometry.Circle(); circle.X = this.X; circle.Y = this.Y; circle.Z = this.Z; circle.Radius = this.Radius; circle.Name = this.Name; circle.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 return circle; }
public static CircleSave FromCircle(FlatRedBall.Math.Geometry.Circle circle) { CircleSave circleSave = new CircleSave(); circleSave.SetFrom(circle); return(circleSave); }
protected virtual void InitializeEntity(bool addToManagers) { LoadStaticContent(ContentManagerName); mCircleInstance = new FlatRedBall.Math.Geometry.Circle(); mCircleInstance.Name = "CircleInstance"; ContrailsEmitter = Parme.Frb.ParmeEmitterManager.Instance .CreateEmitter(new ContrailsEmitterLogic(), this, ""); DeathEmitter = Parme.Frb.ParmeEmitterManager.Instance .CreateEmitter(new ExplosionEmitterLogic(), this, ""); PostInitialize(); if (addToManagers) { AddToManagers(null); } }
public void SetFrom(FlatRedBall.Math.Geometry.Circle circle) { X = circle.X; Y = circle.Y; Z = circle.Z; Radius = circle.Radius; Name = circle.Name; if (circle.Parent != null) { Parent = circle.Parent.Name; } Alpha = circle.Color.A / 255.0f; Red = circle.Color.R / 255.0f; Green = circle.Color.G / 255.0f; Blue = circle.Color.B / 255.0f; }
public FlatRedBall.Math.Geometry.Circle ToCircle() { FlatRedBall.Math.Geometry.Circle circle = new FlatRedBall.Math.Geometry.Circle(); circle.X = this.X; circle.Y = this.Y; circle.Z = this.Z; circle.Radius = this.Radius; circle.Name = this.Name; circle.Color = new Color( (byte)(Red * 255), (byte)(Green * 255), (byte)(Blue * 255), (byte)(Alpha * 255)); return(circle); }