public Food(GameManager gameManager, Screen screen, Vector2 position, float radius) : base(gameManager, screen) { _gameManager = gameManager; _texture = _gameManager.Content.Load<Texture2D>("Textures/food_160"); _isBeingConsumed = false; _energyAmount = (int)Config.settings["Food.Normal.EnergyAmount"]; setPosition(position); setRadius((float)radius); }
public DrawableEntity(GameManager gameManager, Screen screen, String texture) { doDraw = true; _gameManager = gameManager; _screen = screen; _texture = gameManager.Content.Load<Texture2D>(texture); _position = Vector2.Zero; _drawColor = Color.White; _drawScale = 1; _rotation = 0; _alive = true; }
public DrawableEntity(GameManager gameManager, Screen screen) { doDraw = true; _gameManager = gameManager; _screen = screen; _texture = null; _position = Vector2.Zero; _drawColor = Color.White; _drawScale = 1; _rotation = 0; _alive = true; }
public Heart(GameManager gameManager, Screen screen) : base(gameManager, screen) { _drawColor = Color.IndianRed; _connectedFoodLeaves = new List<Leaf>(); _pulseStrength = (int)Config.settings["Heart.InitialPulseStrength"]; _pulseSmallRadius = Config.settings["Heart.PulseSmallRadius"]; _pulseLargeRadius = Config.settings["Heart.PulseLargeRadius"]; _pulseSmallOutDuration = Config.settings["Heart.PulseSmallOutDuration"]; _pulseSmallInDuration = Config.settings["Heart.PulseSmallInDuration"]; _pulseLargeOutDuration = Config.settings["Heart.PulseLargeOutDuration"]; _pulseLargeInDuration = Config.settings["Heart.PulseLargeInDuration"]; _pulsePassOnTime = Config.settings["Heart.PulsePassOnTime"]; _lifeLossPerSecond = 0; setRadius(Config.settings["Heart.Radius"]); updateDistToColor((int)GameManager.LeafColorIndex.NORMAL, -1); updateDistToColor((int)GameManager.LeafColorIndex.HEART, 0); setColor(GameManager.LEAFCOLORS[(int)GameManager.LeafColorIndex.HEART]); }
public Leaf(GameManager gameManager, Screen screen) : base(gameManager, screen) { _gameScreen = (GameScreen)screen; _texture = gameManager.Content.Load<Texture2D>("Textures/circle_white_320"); _selectedTexture = gameManager.Content.Load<Texture2D>("Textures/circle_edge_white_320"); _radius = Config.settings["Leaf.Radius"]; _normalRadius = _radius; _drawRadius = _radius; _parents = new List<Leaf>(); _children = new List<Leaf>(); _pulseDrain = 1; _pulseStrength = 0; _pulseStage = PulseStage.Done; _radiusScaleVelocity = 0; _doingRadiusAnimation = false; _targetRadius = 1; _drawScale = _radius/_texture.Width * 2; _selectedTextureScale = _normalRadius/_selectedTexture.Width * 2; _pulseSmallRadius = Config.settings["Leaf.PulseSmallRadius"]; _pulseLargeRadius = Config.settings["Leaf.PulseLargeRadius"]; _pulseSmallOutDuration = Config.settings["Leaf.PulseSmallOutDuration"]; _pulseSmallInDuration = Config.settings["Leaf.PulseSmallInDuration"]; _pulseLargeOutDuration = Config.settings["Leaf.PulseLargeOutDuration"]; _pulseLargeInDuration = Config.settings["Leaf.PulseLargeInDuration"]; _lifeLossPerSecond = Config.settings["Leaf.LifeLossPerSecond"]; _maxLife = Config.settings["Leaf.MaxLife"]; _pulsePassOnTime = Config.settings["Leaf.PulsePassOnTime"]; _lastPulseTime = 0; _life = _maxLife; _doPulsePassOn = false; isSelected = false; _distToColors = new float[GameManager.NUM_COLORS]; _isEating = false; for (int i = 0; i < GameManager.NUM_COLORS; i++) _distToColors[i] = -1; }
public void setScreen(Screen a) { _screen = a; }
public MovableEntity(GameManager gameManager, Screen screen) : base(gameManager, screen) { }
public Pickup(GameManager gameManager, Screen screen) : base(gameManager, screen) { }
/// <summary> /// Remove screen from the manager. /// </summary> /// <param name="a"></param> public static void removeScreen(Screen a) { _screens.Remove(a.getName()); }
/// <summary> /// Adds the screen to the manager. /// </summary> /// <param name="a"></param> public static void addScreen(Screen a) { _screens.Add(a.getName(), a); }
protected float _radius; //Radius in logic code, used for distance checking etc. #endregion Fields #region Constructors public SphereEntity(GameManager gameManager, Screen screen) : base(gameManager, screen) { }