void BreakBridge(TileAttributes t) { t.type = TileAttributes.TileType.brokenBridge; t.GetComponent <Renderer>().material = brokenBridgeMat; if (t.containedCharacter != null) { t.containedCharacter.returnToStart(); } }
/* * void FixBridge(TileAttributes t) * { * t.type=TileAttributes.TileType.breakableBridge; * t.GetComponent<Renderer>().material=breakableBridgeMat; * } */ void FixBridge(TileAttributes t) { t.type = TileAttributes.TileType.bridge; t.GetComponent <Renderer>().material = breakableBridgeMat; }