Exemple #1
0
    //return 1.0f if tile has boxcollider if wall controller is not present or value specified by wallcontroller
    public float Opacity(Coords2 coords)
    {
        GameObject tile = GetWallTile(coords);

        if (tile == null)
        {
            return(0.0f);
        }

        WallTileController controller = tile.GetComponent <WallTileController>();

        if (controller == null)
        {
            return(tile.GetComponent <BoxCollider2D>() != null ? 1.0f : 0.0f);
        }

        return(controller.Opacity());
    }
 public override float Opacity()
 {
     return(ownerController.Opacity());
 }