Implemented basic room exploration logic.
This commit is contained in:
parent
cb7aff20dd
commit
4bd34a1335
13 changed files with 186 additions and 92 deletions
18
PuzzleGameProject/Assets/Scripts/ColorUtility.cs
Normal file
18
PuzzleGameProject/Assets/Scripts/ColorUtility.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using UnityEngine;
|
||||
|
||||
public static class ColorUtility
|
||||
{
|
||||
public static Color AddGreyShade(Color originalColor, float greyIntensity)
|
||||
{
|
||||
// Clamp the greyIntensity between 0 and 1
|
||||
greyIntensity = Mathf.Clamp01(greyIntensity);
|
||||
|
||||
// Define the grey color (e.g., medium grey)
|
||||
Color grey = new Color(0.5f, 0.5f, 0.5f); // RGB (128, 128, 128)
|
||||
|
||||
// Blend the original color with the grey color
|
||||
Color blendedColor = Color.Lerp(originalColor, grey, greyIntensity);
|
||||
|
||||
return blendedColor;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue