/// <summary> /// Constructor for name 2d /// </summary> public CombatText(string name, GameTime gameTime, Vector2 pos, Screens.GameplayScreen screen, Camera cam) { camRef = cam; CombatColor = Color.Green; Text = name; ExpireTime = gameTime.TotalGameTime.Seconds; Position = camRef.Relative3Dto2D(pos); Font = screen.ScreenManager.Game.Content.Load<SpriteFont>("Fonts\\monofont"); Origin = new Vector2(0, 0); }
private string _text; // can represent damage, health, or a weapon name #endregion Fields #region Constructors /// <summary> /// Constructor for damage 2d /// </summary> public CombatText(bool isGood, float amount, GameTime gameTime, Vector2 pos, Screens.GameplayScreen screen, Camera cam) { camRef = cam; CombatColor = isGood ? Color.Blue : Color.Red; Text = amount.ToString(); ExpireTime = gameTime.TotalGameTime.Seconds; Position = camRef.Relative3Dto2D(pos); Font = screen.ScreenManager.Game.Content.Load<SpriteFont>("Fonts\\monofont"); Origin = new Vector2(0, 0); }
public Asteroid(Screens.GameScreen gameScreen, Camera camera1) : base(gameScreen, 10f, 0d, 5d, new Vector3(MakeRespawnPoint(), 0.67f)) { AllowFriction = false; ReferenceCamera = camera1; }