public void BuyRod(RodType rod) { print(rod.ToString()); FindObjectOfType <Inventory>().money -= rod.price; }
/// <summary> /// Loads the sprites necessary to display this state. /// </summary> public void LoadContent(ContentManager content) { RodSprites = new Dictionary <RodType, Sprite>(); for (RodType rod = RodType.Bronze; rod <= RodType.Legendary; rod++) { Sprite rodSprite = content.Load <SpriteDescriptorTemplate>("Sprites/Fishing/Rod" + rod.ToString()).Create().Sprite; rodSprite.Position += _scene.PlayerPosition; RodSprites.Add(rod, rodSprite); } LureSprites = new Dictionary <Lure, Sprite>(); for (int i = 0; i < FishingGirl.Gameplay.Lures.AllLures.Length; i++) { Lure lure = FishingGirl.Gameplay.Lures.AllLures[i]; Sprite lureSprite = content.Load <SpriteDescriptorTemplate>("Sprites/Fishing/" + lure.SpriteName).Create().Sprite; LureSprites.Add(lure, lureSprite); } LineSprite = content.Load <SpriteDescriptorTemplate>("Sprites/Fishing/Line").Create().Sprite; // set up the lure now that we know what the rod looks like _lurePosition = GetRodTipPosition() + new Vector2(5f, 15f); }