AmongUs-Practice/Assets/Scripts/PlayerColors.cs

56 lines
1.8 KiB
C#
Raw Normal View History

2023-09-02 19:58:00 +09:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum E_PLAYER_COLOR
{
Red,
Blue,
Green,
Pink,
Orange,
Yellow,
Black,
White,
Purple,
Brown,
Cyan,
Lime,
}
public class PlayerColors : MonoBehaviour
{
private static List<Color> _colors = new()
{
new Color(1f, 0f, 0f),
new Color(0.1f, 0.1f, 1f),
new Color(0f, 0.6f, 0f),
new Color(1f, 0.3f, 9f),
new Color(1f, 0.4f, 0f),
new Color(1f, 0.9f, 0.1f),
new Color(0.2f, 0.2f, 0.2f),
new Color(0.9f, 1f, 1f),
new Color(0.6f, 0f, 0.6f),
new Color(0.7f, 0.2f, 0f),
new Color(0f, 1f, 1f),
new Color(0.1f, 1f, 0.1f),
};
public static Color GetColor(E_PLAYER_COLOR playerColor)
{
return _colors[(int)playerColor];
}
public static Color Red { get { return _colors[(int)E_PLAYER_COLOR.Red]; } }
public static Color Blue { get { return _colors[(int)E_PLAYER_COLOR.Blue]; } }
public static Color Green { get { return _colors[(int)E_PLAYER_COLOR.Green]; } }
public static Color Pink { get { return _colors[(int)E_PLAYER_COLOR.Pink]; } }
public static Color Orange { get { return _colors[(int)E_PLAYER_COLOR.Orange]; } }
public static Color Yellow { get { return _colors[(int)E_PLAYER_COLOR.Yellow]; } }
public static Color Black { get { return _colors[(int)E_PLAYER_COLOR.Black]; } }
public static Color White { get { return _colors[(int)E_PLAYER_COLOR.White]; } }
public static Color Purple { get { return _colors[(int)E_PLAYER_COLOR.Purple]; } }
public static Color Brown { get { return _colors[(int)E_PLAYER_COLOR.Brown]; } }
public static Color Cyan { get { return _colors[(int)E_PLAYER_COLOR.Cyan]; } }
public static Color Lime { get { return _colors[(int)E_PLAYER_COLOR.Lime]; } }
}