// Use this for initialization void Start() { ingredientSelector = FindObjectOfType <IngredientSelector>(); matchCalculator = MatchCalculator.matchCalculator; float targetGemWidth = boardWidth / width; bELibrary = LibraryManager.instance.get <BELibrary>(); RectTransform rt = (RectTransform)availibleGems[0].gameObject.transform; float tempGemWidth = rt.rect.width; beScalar = targetGemWidth / tempGemWidth; foreach (IBoardEntity be in availibleGems) { be.gameObject.transform.localScale = new Vector2(beScalar, beScalar); } gemWidth = targetGemWidth; gemHeight = targetGemWidth; selectedIngredient = null; DayManager.dayManager.start += () => { populateBoard(); unlockBoard(); //checkMatchesAfterHelper(1); }; DayManager.dayManager.end += () => { clearBoard(); started = false; }; }
public AdditionalMoveIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Mixed Blend"; description = "Allows you to play another ingredient"; flavorText = "This blend works wonders if you mix it with somethings"; type = IngredientType.AdditionalMove; displacementType = IngredientDisplacement.Left; bonusPlacement = true; boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.YellowGem)); }
public BasicYellowIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Kona"; description = "A basic ingredient"; flavorText = "The champagne of coffee"; type = IngredientType.BasicYellow; displacementType = IngredientDisplacement.Down; boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.YellowGem)); boardEntities.Add(new Position(1, 1), bELibrary.get(GemType.YellowGem)); }
public ChangeColorIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Color Changer"; description = "Changes adjacent blue gems to purple gems"; flavorText = "Where those gems always purple?"; showAdjacent = true; type = IngredientType.BlueToPurple; displacementType = IngredientDisplacement.Down; boardEntities.Add(new Position(0, 1), bELibrary.get(GemType.PurpleGem)); boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.GreenGem)); }
public ColorDestroyIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Yellow Destroyer"; description = "Destroys all yellow gems"; flavorText = "This ingredient really doesn't play well with others"; type = IngredientType.YellowDestroy; displacementType = IngredientDisplacement.Left; boardEntities.Add(new Position(0, 1), bELibrary.get(GemType.GreenGem)); boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.BlueGem)); }
public BasicRedIngredient(BELibrary bELibrary) : base(bELibrary) { title = "House Blend"; description = "A basic ingredient"; flavorText = "Coreys in the house"; type = IngredientType.BasicRed; displacementType = IngredientDisplacement.Up; boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.RedGem)); boardEntities.Add(new Position(1, 0), bELibrary.get(GemType.YellowGem)); boardEntities.Add(new Position(1, 1), bELibrary.get(GemType.RedGem)); }
public BasicBlueIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Blue Mountain"; description = "A basic ingredient"; flavorText = "For when your feeling blue"; type = IngredientType.BasicBlue; displacementType = IngredientDisplacement.Right; boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.BlueGem)); boardEntities.Add(new Position(0, 1), bELibrary.get(GemType.RedGem)); boardEntities.Add(new Position(1, 2), bELibrary.get(GemType.BlueGem)); }
public BasicPurpleIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Purple Haze"; description = "A basic ingredient"; flavorText = "I'm tired of writing these flavor texts"; type = IngredientType.BasicPurple; displacementType = IngredientDisplacement.Right; boardEntities.Add(new Position(1, -1), bELibrary.get(GemType.RedGem)); boardEntities.Add(new Position(1, 1), bELibrary.get(GemType.PurpleGem)); boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.PurpleGem)); }
public BasicGreenIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Sumtra"; description = "A basic ingredient"; flavorText = "Earthy"; type = IngredientType.BasicGreen; displacementType = IngredientDisplacement.Left; boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.GreenGem)); boardEntities.Add(new Position(1, -1), bELibrary.get(GemType.GreenGem)); boardEntities.Add(new Position(1, 0), bELibrary.get(GemType.BlueGem)); }
public SmallBlackIngredient(BELibrary bELibrary) : base(bELibrary) { title = "Thick Coffee"; description = "Contains Black Gems which cannot be matched"; flavorText = "Might be to thick to handle"; type = IngredientType.SmallBlack; displacementType = IngredientDisplacement.Up; fallingTypes = new List <GemType> { GemType.RedGem, GemType.RedGem }; boardEntities.Add(new Position(0, 0), bELibrary.get(GemType.BlueGem)); boardEntities.Add(new Position(1, 0), bELibrary.get(GemType.BlueGem)); boardEntities.Add(new Position(1, 1), bELibrary.get(GemType.Blocker)); boardEntities.Add(new Position(1, 2), bELibrary.get(GemType.RedGem)); boardEntities.Add(new Position(2, 2), bELibrary.get(GemType.RedGem)); }
public void makeDictionary() { BELibrary bELibrary = LibraryManager.instance.get <BELibrary>(); ingredients.Add(new BasicBlueIngredient(bELibrary)); ingredients.Add(new BasicRedIngredient(bELibrary)); ingredients.Add(new BasicGreenIngredient(bELibrary)); ingredients.Add(new BasicYellowIngredient(bELibrary)); ingredients.Add(new BasicPurpleIngredient(bELibrary)); ingredients.Add(new SmallBlackIngredient(bELibrary)); ingredients.Add(new ChangeColorIngredient(bELibrary)); ingredients.Add(new ColorDestroyIngredient(bELibrary)); ingredients.Add(new AdditionalMoveIngredient(bELibrary)); foreach (Ingredient ingredient in ingredients) { ingredientsDict.Add(ingredient.type, ingredient); } }
public Ingredient(BELibrary bELibrary) { this.bELibrary = bELibrary; //description = "A basic ingredient"; //flavorText = "Chocolate tasting notes"; }