//requires wall to have wallcontroler private bool InteractWall(Coords2 coords, Player player) { GameObject tile = GetWallTile(coords); if (tile == null) { return(false); } WallTileController controller = tile.GetComponent <WallTileController>(); if (controller == null) { return(false); } bool interacted = controller.Interact(coords, player); if (interacted) { WallTileChanged(coords); } return(interacted); }
public override bool Interact(Coords2 coords, Player player) { return(ownerController.Interact(coords, player)); }