Color GetColor(ChainJam.PLAYER id) { switch (id) { case ChainJam.PLAYER.PLAYER1: return(new Color(49.0f / 255, 50.0f / 255, 50.0f / 255)); case ChainJam.PLAYER.PLAYER2: return(new Color(39.0f / 255, 173.0f / 255, 227.0f / 255)); case ChainJam.PLAYER.PLAYER3: return(new Color(238.0f / 255, 54.0f / 255, 138.0f / 255)); case ChainJam.PLAYER.PLAYER4: return(new Color(176.0f / 255, 209.0f / 255, 54.0f / 255)); } return(Color.black); }
// Use this for initialization void Start() { id = GameState.Instance.NextPlayerId; controllerId = GameState.GetControllerFromPlayerId(id); currentState = Idle; currentWalkState = Stand; startPosition = transform.position; _walkStepParticles.enableEmission = false; animator = GetComponentInChildren <Animator>(); meshTransform = transform.FindChild("Mesh"); }
public static PlayerIndex GetControllerFromPlayerId(ChainJam.PLAYER player) { switch (player) { case ChainJam.PLAYER.PLAYER1: return(PlayerIndex.One); case ChainJam.PLAYER.PLAYER2: return(PlayerIndex.Two); case ChainJam.PLAYER.PLAYER3: return(PlayerIndex.Three); case ChainJam.PLAYER.PLAYER4: return(PlayerIndex.Four); default: return(PlayerIndex.One); } }
// Use this for initialization void Start() { id = GameState.Instance.NextPlayerId; controllerId = GameState.GetControllerFromPlayerId(id); currentState = Idle; currentWalkState = Stand; startPosition = transform.position; _walkStepParticles.enableEmission = false; animator = GetComponentInChildren<Animator>(); meshTransform = transform.FindChild("Mesh"); }