完成阻隔点
This commit is contained in:
@@ -37,20 +37,25 @@ public enum CellType
|
||||
/// <20><>̯<EFBFBD><CCAF><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
Stall = 32,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum CellLayer
|
||||
{
|
||||
Move = 1, //<2F>ƶ<EFBFBD>
|
||||
Obstacle = 2, //<2F>赲
|
||||
Hide = 4, //<2F><><EFBFBD><EFBFBD>
|
||||
Safe = 16, //<2F><>ȫ<EFBFBD><C8AB>
|
||||
Stall = 32, //<2F><>̯
|
||||
Audio = 64, //<2F><>Ч
|
||||
Trigger = 128, //<2F><><EFBFBD><EFBFBD>
|
||||
Monster = 256 //<2F><><EFBFBD><EFBFBD>
|
||||
}
|
||||
|
||||
//[Flags]
|
||||
//public enum CellLayer
|
||||
//{
|
||||
// None = 0, //<2F><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
|
||||
// Move = 1, //<2F>ƶ<EFBFBD>
|
||||
// Obstacle = 2, //<2F>赲
|
||||
// Hide = 4, //<2F><><EFBFBD><EFBFBD>
|
||||
// Safe = 16, //<2F><>ȫ<EFBFBD><C8AB>
|
||||
// Stall = 32, //<2F><>̯
|
||||
// Audio = 64, //<2F><>Ч
|
||||
// Trigger = 128, //<2F><><EFBFBD><EFBFBD>
|
||||
// Monster = 256 //<2F><><EFBFBD><EFBFBD>
|
||||
//}
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
||||
/// </summary>
|
||||
@@ -66,41 +71,38 @@ public class AreaColor
|
||||
}
|
||||
public class CellTypeColors
|
||||
{
|
||||
public static Color None = new Color(0x80 / 255f, 0x80 / 255f, 0x80 / 255f); // <20><>ɫ (#808080)
|
||||
public static Color Move = new Color(0x33 / 255f, 0xcc / 255f, 0x33 / 255f); // <20><>ɫ (#33cc33)
|
||||
public static Color Obstacle = new Color(0xff / 255f, 0x00 / 255f, 0x00 / 255f); // <20><>ɫ (#ff4d4d)
|
||||
public static Color Hide = new Color(0x33 / 255f, 0x33 / 255f, 0x33 / 255f); // <20><><EFBFBD><EFBFBD>ɫ (#333333)
|
||||
public static Color HadRole = new Color(0xb3 / 255f, 0x33 / 255f, 0xb3 / 255f); // <20><>ɫ (#b333b3)
|
||||
public static Color Safe = new Color(0x00 / 255f, 0xff / 255f, 0xff / 255f); // <20><>ɫ (#00ffff)
|
||||
public static Color Stall = new Color(0xff / 255f, 0xff / 255f, 0x99 / 255f); // dz<><C7B3>ɫ (#ffff99)
|
||||
public static Color Water = new Color(0x00 / 255f, 0x4c / 255f, 0xb3 / 255f); // ˮ<><CBAE>ɫ (#004cb3)
|
||||
public static Color Snow = new Color(0xff / 255f, 0xff / 255f, 0xff / 255f); // <20><>ɫ (#ffffff)
|
||||
public static Color Sand = new Color(0xff / 255f, 0xcc / 255f, 0x66 / 255f); // ɳ<><C9B3>ɫ (#ffcc66)
|
||||
public static Color Stone = new Color(0x66 / 255f, 0x66 / 255f, 0x66 / 255f); // <20><><EFBFBD><EFBFBD>ɫ (#666666)
|
||||
public static Color Wood = new Color(0x8B / 255f, 0x45 / 255f, 0x13 / 255f); // <20><>ɫ (#8B4513)
|
||||
public static Color Grass = new Color(0x00 / 255f, 0xff / 255f, 0xff / 255f); // <20><>ɫ (#00ffff)
|
||||
public static Color Dirt = new Color(0xff / 255f, 0x49 / 255f, 0x00 / 255f); // dz<><C7B3>ɫ (#FF4900)
|
||||
public static Color None = new Color(0xb0 / 255f, 0xb0 / 255f, 0xb0 / 255f,0); // dz<EFBFBD><EFBFBD>ɫ (#b0b0b0)
|
||||
public static Color Move = new Color(0x00 / 255f, 0xff / 255f, 0x00 / 255f); // <20><><EFBFBD><EFBFBD>ɫ (#00ff00)
|
||||
public static Color Obstacle = new Color(0xff / 255f, 0x00 / 255f, 0x00 / 255f); // <20>ʺ<EFBFBD>ɫ (#ff0000)
|
||||
public static Color Hide = new Color(0x80 / 255f, 0x00 / 255f, 0xff / 255f); // <20><><EFBFBD><EFBFBD>ɫ (#8000ff)
|
||||
public static Color Safe = new Color(0x00 / 255f, 0xff / 255f, 0xff / 255f); // <20><><EFBFBD><EFBFBD>ɫ (#00ffff)
|
||||
public static Color Stall = new Color(0xff / 255f, 0x80 / 255f, 0x00 / 255f); // <20>ʳ<EFBFBD>ɫ (#ff8000)
|
||||
|
||||
public static Color GetColor(CellType cellType)
|
||||
{
|
||||
Color color = Color.clear; // <20><>ʼ<EFBFBD><CABC>Ϊ<EFBFBD><CEAA>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
|
||||
if (cellType == CellType.None) return CellTypeColors.None;
|
||||
if (true)
|
||||
if (cellType.HasFlag(CellType.Move)) color += CellTypeColors.Move * 0.6f;
|
||||
if (cellType.HasFlag(CellType.Obstacle)) color += CellTypeColors.Obstacle * 0.6f;
|
||||
if(UICellEditor.Instance == null) return color;
|
||||
if (UICellEditor.Instance.editorGrid == CellType.Hide)
|
||||
{
|
||||
if (cellType.HasFlag(CellType.Move)) color += CellTypeColors.Move;
|
||||
if (cellType.HasFlag(CellType.Hide)) color += CellTypeColors.Hide * 0.8f;
|
||||
}
|
||||
else if (true)
|
||||
else if (UICellEditor.Instance.editorGrid == CellType.Safe)
|
||||
{
|
||||
if (cellType.HasFlag(CellType.Safe)) color += CellTypeColors.Safe;
|
||||
if (cellType.HasFlag(CellType.Safe)) color += CellTypeColors.Safe * 0.8f;
|
||||
}
|
||||
else if (true)
|
||||
else if (UICellEditor.Instance.editorGrid == CellType.Stall)
|
||||
{
|
||||
if (cellType.HasFlag(CellType.Stall)) color += CellTypeColors.Stall;
|
||||
if (cellType.HasFlag(CellType.Stall)) color += CellTypeColors.Stall * 0.8f;
|
||||
}
|
||||
if (cellType.HasFlag(CellType.Obstacle)) color += CellTypeColors.Obstacle;
|
||||
// <20><><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ,<2C>Ȳ<EFBFBD><C8B2><EFBFBD>һ<EFBFBD><D2BB>
|
||||
//color /= 7.0f; // 7 <20><> CellType <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// ȷ<><C8B7><EFBFBD><EFBFBD>ɫֵ<C9AB><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1
|
||||
color.r = Mathf.Clamp01(color.r);
|
||||
color.g = Mathf.Clamp01(color.g);
|
||||
color.b = Mathf.Clamp01(color.b);
|
||||
color.a = 1f; // ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><CDB8>
|
||||
return color;
|
||||
}
|
||||
public static string GetAreaStr(int barrier)
|
||||
|
||||
Reference in New Issue
Block a user