Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    // 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");
    }
Exemplo n.º 3
0
    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);
        }
    }
Exemplo n.º 4
0
    // 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");
    }