void ApplyScaleForFood(GameObject foodObj, double newScaleStep) { Food f = foodObj.GetComponent <Food>(); // Change scale of Food float newLocalScaleOfFood = (float)Math.Pow(2, f.standardScaleStep - newScaleStep); EffectManager.ScaleChange(foodObj, newLocalScaleOfFood); // Change position of Food float newPostionScale = (float)Math.Pow(2, (f.standardScaleStep - newScaleStep)); Vector3 newPos = f.standardPos * newPostionScale; EffectManager.ChangeFoodPositon(foodObj, _playerObj, newPos); }