Exemple #1
0
 public void ShowCenter(bool center, Color centerColor)
 {
     if (!center)
     {
         centerColor.a = 0;
     }
     ProjectionMaterial.SetColor("_CenterColor", centerColor);
 }
Exemple #2
0
    public void ShowBorder(bool[] borders, Color color)
    {
        int bordersInt = BordersToInt(borders);

        if (borders.ToList().FindAll(b => b == true).Count > 0)
        {
            projector.enabled = true;
            ProjectionMaterial.SetTexture("_ShadowTex", borderTextures[bordersDictionary[bordersInt].textureIndex]);
            ProjectionMaterial.color = color;
            transform.rotation       = Quaternion.Euler(90, 30 + bordersDictionary[bordersInt].rotation * 60, 0);
        }
        else
        {
            projector.enabled = false;
        }
    }