public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (mCollisionCircle.Parent == null) { mCollisionCircle.CopyAbsoluteToRelative(); mCollisionCircle.AttachTo(this, false); } CollisionCircle.Radius = 4f; CollisionCircle.Visible = false; if (mKickIndicatorInstance.Parent == null) { mKickIndicatorInstance.CopyAbsoluteToRelative(); mKickIndicatorInstance.AttachTo(this, false); } if (SpriteInstance.Parent == null) { SpriteInstance.CopyAbsoluteToRelative(); SpriteInstance.AttachTo(this, false); } SpriteInstance.Texture = SoccerBall; SpriteInstance.TextureScale = 1f; SpriteInstance.Width = 8f; SpriteInstance.Height = 8f; mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); Collision.Circles.AddOneWay(mCollisionCircle); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (SpriteInstance.Parent == null) { SpriteInstance.CopyAbsoluteToRelative(); SpriteInstance.AttachTo(this, false); } if (SpriteInstance.Parent == null) { SpriteInstance.Z = 0f; } else { SpriteInstance.RelativeZ = 0f; } SpriteInstance.Texture = BulletSprite; SpriteInstance.TextureScale = 1f; if (mCircleInstance.Parent == null) { mCircleInstance.CopyAbsoluteToRelative(); mCircleInstance.AttachTo(this, false); } CircleInstance.Radius = 1f; mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); mGeneratedCollision.Circles.AddOneWay(mCircleInstance); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (mCircleInstance.Parent == null) { mCircleInstance.CopyAbsoluteToRelative(); mCircleInstance.AttachTo(this, false); } CircleInstance.Radius = 16f; CircleInstance.Visible = false; mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); mGeneratedCollision.Circles.AddOneWay(mCircleInstance); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (mAxisAlignedRectangleInstance.Parent == null) { mAxisAlignedRectangleInstance.CopyAbsoluteToRelative(); mAxisAlignedRectangleInstance.AttachTo(this, false); } if (AxisAlignedRectangleInstance.Parent == null) { AxisAlignedRectangleInstance.Y = -2f; } else { AxisAlignedRectangleInstance.RelativeY = -2f; } AxisAlignedRectangleInstance.Width = 8f; AxisAlignedRectangleInstance.Height = 12.5f; AxisAlignedRectangleInstance.Visible = false; if (mBallCatchArea.Parent == null) { mBallCatchArea.CopyAbsoluteToRelative(); mBallCatchArea.AttachTo(this, false); } BallCatchArea.Radius = 16f; BallCatchArea.Visible = false; if (SpriteInstance.Parent == null) { SpriteInstance.CopyAbsoluteToRelative(); SpriteInstance.AttachTo(this, false); } SpriteInstance.TextureScale = 0.25f; SpriteInstance.AnimationChains = AnimationChainListFile; SpriteInstance.CurrentChainName = "Idle"; mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); Collision.AxisAlignedRectangles.AddOneWay(mAxisAlignedRectangleInstance); Collision.Circles.AddOneWay(mBallCatchArea); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (SpriteInstance.Parent == null) { SpriteInstance.CopyAbsoluteToRelative(); SpriteInstance.AttachTo(this, false); } SpriteInstance.Texture = AllAssetsSheet; SpriteInstance.LeftTexturePixel = 2816f; SpriteInstance.RightTexturePixel = 2944f; SpriteInstance.TopTexturePixel = 3968f; SpriteInstance.BottomTexturePixel = 4096f; SpriteInstance.TextureScale = 1f; SpriteInstance.AnimationChains = AnimationChainListFile; SpriteInstance.CurrentChainName = "Spin"; if (mCircleInstance.Parent == null) { mCircleInstance.CopyAbsoluteToRelative(); mCircleInstance.AttachTo(this, false); } CircleInstance.Radius = 75f; CircleInstance.Visible = false; if (mRangePreviewSprite.Parent == null) { mRangePreviewSprite.CopyAbsoluteToRelative(); mRangePreviewSprite.AttachTo(this, false); } RangePreviewSprite.TextureScale = 1f; RangePreviewSprite.Visible = false; RangePreviewSprite.Alpha = 0.8f; mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); mGeneratedCollision.Circles.AddOneWay(mCircleInstance); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; this.BoatNearDock += OnBoatNearDock; if (TextInstance.Parent == null) { TextInstance.CopyAbsoluteToRelative(); TextInstance.AttachTo(this, false); } TextInstance.DisplayText = "Accoster (E)"; TextInstance.HorizontalAlignment = FlatRedBall.Graphics.HorizontalAlignment.Right; TextInstance.VerticalAlignment = FlatRedBall.Graphics.VerticalAlignment.Center; TextInstance.Visible = false; if (mCircleInstance.Parent == null) { mCircleInstance.CopyAbsoluteToRelative(); mCircleInstance.AttachTo(this, false); } CircleInstance.Radius = 48f; CircleInstance.Visible = false; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (SpriteInstance.Parent == null) { SpriteInstance.CopyAbsoluteToRelative(); SpriteInstance.AttachTo(this, false); } if (SpriteInstance.Parent == null) { SpriteInstance.X = 2.026742f; } else { SpriteInstance.RelativeX = 2.026742f; } if (SpriteInstance.Parent == null) { SpriteInstance.Y = 15.20056f; } else { SpriteInstance.RelativeY = 15.20056f; } if (SpriteInstance.Parent == null) { SpriteInstance.Z = 1f; } else { SpriteInstance.RelativeZ = 1f; } SpriteInstance.TextureScale = 1f; SpriteInstance.ParentRotationChangesPosition = false; if (LightOrShadowSprite.Parent == null) { LightOrShadowSprite.CopyAbsoluteToRelative(); LightOrShadowSprite.AttachTo(this, false); } if (LightOrShadowSprite.Parent == null) { LightOrShadowSprite.Z = -1f; } else { LightOrShadowSprite.RelativeZ = -1f; } LightOrShadowSprite.Texture = AllParticles; LightOrShadowSprite.LeftTexturePixel = 1019f; LightOrShadowSprite.RightTexturePixel = 1072f; LightOrShadowSprite.TopTexturePixel = 1895f; LightOrShadowSprite.BottomTexturePixel = 1948f; LightOrShadowSprite.TextureScale = 1f; LightOrShadowSprite.AnimationChains = BaseProjectileLightAnimationChainListFile; LightOrShadowSprite.CurrentChainName = "Light_Shot"; LightOrShadowSprite.ParentRotationChangesPosition = false; if (mCircleInstance.Parent == null) { mCircleInstance.CopyAbsoluteToRelative(); mCircleInstance.AttachTo(this, false); } if (CircleInstance.Parent == null) { CircleInstance.X = 0f; } else { CircleInstance.RelativeX = 0f; } if (CircleInstance.Parent == null) { CircleInstance.Y = 0f; } else { CircleInstance.RelativeY = 0f; } CircleInstance.Radius = 16f; CircleInstance.Color = Microsoft.Xna.Framework.Color.Red; CircleInstance.ParentRotationChangesPosition = false; if (AnimationChainInstance != null) { } mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); mGeneratedCollision.Circles.AddOneWay(mCircleInstance); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (SpriteInstance.Parent == null) { SpriteInstance.CopyAbsoluteToRelative(); SpriteInstance.AttachTo(this, false); } if (SpriteInstance.Parent == null) { SpriteInstance.Z = 1f; } else { SpriteInstance.RelativeZ = 1f; } SpriteInstance.TextureScale = 1f; SpriteInstance.AnimationChains = AnimationChainListFile; SpriteInstance.CurrentChainName = "OrangeBody"; if (mCircleInstance.Parent == null) { mCircleInstance.CopyAbsoluteToRelative(); mCircleInstance.AttachTo(this, false); } CircleInstance.Radius = 16f; CircleInstance.Visible = false; if (TurretInstance.Parent == null) { TurretInstance.CopyAbsoluteToRelative(); TurretInstance.AttachTo(this, false); } if (TurretInstance.Parent == null) { TurretInstance.X = 0f; } else { TurretInstance.RelativeX = 0f; } if (TurretInstance.Parent == null) { TurretInstance.Z = 2f; } else { TurretInstance.RelativeZ = 2f; } if (TankShadow.Parent == null) { TankShadow.CopyAbsoluteToRelative(); TankShadow.AttachTo(this, false); } if (TankShadow.Parent == null) { TankShadow.X = 5f; } else { TankShadow.RelativeX = 5f; } if (TankShadow.Parent == null) { TankShadow.Y = -5f; } else { TankShadow.RelativeY = -5f; } if (TankShadow.Parent == null) { TankShadow.Z = 0.1f; } else { TankShadow.RelativeZ = 0.1f; } TankShadow.TextureScale = 1f; TankShadow.UseAnimationRelativePosition = false; TankShadow.AnimationChains = AnimationChainListFile; TankShadow.CurrentChainName = "TankShadow"; TankShadow.ParentRotationChangesPosition = false; if (SmokeInstance.Parent == null) { SmokeInstance.CopyAbsoluteToRelative(); SmokeInstance.AttachTo(this, false); } if (SmokeInstance.Parent == null) { SmokeInstance.X = -8f; } else { SmokeInstance.RelativeX = -8f; } if (SmokeInstance.Parent == null) { SmokeInstance.Z = 3f; } else { SmokeInstance.RelativeZ = 3f; } mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); mGeneratedCollision.Circles.AddOneWay(mCircleInstance); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }
public virtual void PostInitialize() { bool oldShapeManagerSuppressAdd = FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue; FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = true; if (SpriteInstance.Parent == null) { SpriteInstance.CopyAbsoluteToRelative(); SpriteInstance.AttachTo(this, false); } if (SpriteInstance.Parent == null) { SpriteInstance.Z = 2f; } else { SpriteInstance.RelativeZ = 2f; } SpriteInstance.TextureScale = 1f; SpriteInstance.AnimationChains = AnimationChainListFile; SpriteInstance.CurrentChainName = "OrangeMissile"; if (mCircleInstance.Parent == null) { mCircleInstance.CopyAbsoluteToRelative(); mCircleInstance.AttachTo(this, false); } CircleInstance.Radius = 3f; CircleInstance.Visible = false; if (BulletShadow.Parent == null) { BulletShadow.CopyAbsoluteToRelative(); BulletShadow.AttachTo(this, false); } if (BulletShadow.Parent == null) { BulletShadow.X = 10f; } else { BulletShadow.RelativeX = 10f; } if (BulletShadow.Parent == null) { BulletShadow.Y = -10f; } else { BulletShadow.RelativeY = -10f; } if (BulletShadow.Parent == null) { BulletShadow.Z = 0.1f; } else { BulletShadow.RelativeZ = 0.1f; } BulletShadow.TextureScale = 1f; BulletShadow.UseAnimationRelativePosition = false; BulletShadow.AnimationChains = AnimationChainListFile; BulletShadow.CurrentChainName = "MissileShadow"; BulletShadow.ParentRotationChangesPosition = false; if (MissileTrailInstance.Parent == null) { MissileTrailInstance.CopyAbsoluteToRelative(); MissileTrailInstance.AttachTo(this, false); } if (MissileTrailInstance.Parent == null) { MissileTrailInstance.X = -20f; } else { MissileTrailInstance.RelativeX = -20f; } if (MissileTrailInstance.Parent == null) { MissileTrailInstance.Z = 2f; } else { MissileTrailInstance.RelativeZ = 2f; } mGeneratedCollision = new FlatRedBall.Math.Geometry.ShapeCollection(); mGeneratedCollision.Circles.AddOneWay(mCircleInstance); FlatRedBall.Math.Geometry.ShapeManager.SuppressAddingOnVisibilityTrue = oldShapeManagerSuppressAdd; }