Esempio n. 1
0
    public override void Paint(GridLayout grid, GameObject layer, Vector3Int position)
    {
        Tilemap tm = BrushUtility
                     .GetLayer(layerName)
                     .GetComponent <Tilemap>();

        Killer killer = tm.gameObject.GetComponent <Killer>() ?? layer.AddComponent <Killer>();

        killer.SetOnKilledEvent(onKilledEvent);
        killer.SetLayerMask(killerMask);

        tm.SetTile(position, tile);
    }