Exemplo n.º 1
0
    public void Changecolor(DLLColor.Color dllcolor)
    {
        switch(dllcolor)
        {
            case DLLColor.Color.NEUTRAL:
                DLLcolor.color = Color.white;
                break;
            case DLLColor.Color.BLUE:
                DLLcolor.color = Color.blue;
                break;
            case DLLColor.Color.RED:
                DLLcolor.color = Color.red;
                break;
            case DLLColor.Color.GREEN:
                DLLcolor.color = Color.green;
                break;

        }
    }
Exemplo n.º 2
0
    void ChangeColor(DLLColor.Color col)
    {
        color = col;

        gameObject.GetComponentInChildren<SpriteRenderer> ().sprite = lazerSprites[(int)color];
    }
Exemplo n.º 3
0
    protected int WeaknessCheck(DLLColor.Color bullet, DLLColor.Color target)
    {
        if (bullet == DLLColor.Color.NEUTRAL || target == DLLColor.Color.NEUTRAL || bullet == target)
            return 0;

        if (bullet == DLLColor.Color.RED && target == DLLColor.Color.GREEN ||
            bullet == DLLColor.Color.GREEN && target == DLLColor.Color.BLUE ||
            bullet == DLLColor.Color.BLUE && target == DLLColor.Color.RED)
            return 1;

        return -1;
    }