public void Start() { Ingredient.SComparisonScore score = _ingredientA.Compare(_ingredientB); Debug.Log("Comparing " + _ingredientA.name + " with " + _ingredientB.name + "\n" + "==========================\n" + "COLOR : " + score._colorScore + " (Weight: " + score._colorWeight + ")\n" + "SOLIDITY : " + score._solidityScore + " (Weight: " + score._solidityWeight + ")\n" + "LENGTH : " + score._lengthScore + " (Weight: " + score._lengthWeight + ")\n" + "TEMPERATURE : " + score._temperatureScore + " (Weight: " + score._temperatureWeight + ")\n" + "==========================\n" + "GLOBAL : " + score._globalScore ); }
public void ShipRecipe() { SRecipeScore recipeScore = new SRecipeScore(); int ingredientCount = _CurrentRecipe._Ingredients.Count; for (int i = 0; i < ingredientCount; ++i) { Ingredient.SComparisonScore ingredientScore = new Ingredient.SComparisonScore(); if (PreparationStation._LaborOfLove.Count > i) { Ingredient laborIngredient = PreparationStation._LaborOfLove[i]; ingredientScore = _CurrentRecipe._Ingredients[i].Compare(laborIngredient); } recipeScore._IngredientScores.Add(ingredientScore); recipeScore._GlobalScore += ingredientScore._globalScore / ingredientCount; } _Score += (int)(recipeScore._GlobalScore * 100); _RecipeTickRemaining = 0f; _alreadyShipped = true; if (OnRecipeShipped != null) { OnRecipeShipped(recipeScore); } // Debug string string debugScore = "Score: " + recipeScore._GlobalScore * 100 + "\n"; for (int i = 0; i < recipeScore._IngredientScores.Count; ++i) { var ingredient = recipeScore._IngredientScores[i]; debugScore += "Ingredient " + (i + 1) + ": " + ingredient._globalScore * 100 + "(C:" + ingredient._colorScore * 100 + " S:" + ingredient._solidityScore * 100 + " L:" + ingredient._lengthScore * 100 + " T:" + ingredient._temperatureScore * 100 + ")\n"; } Debug.Log(debugScore); }