public void InstallLine(FishingLine fishingLine) { if (ItemCanBeInstalled) { if (CurrentRod.CurrentLine != null) { RaiseMessage(string.Format("{0} returned to Backpack", CurrentRod.CurrentLine.Name)); CurrentPlayer.AddItemToBackpack(CurrentRod.CurrentLine); } FishingLine line = fishingLine.BreakLine(50); if (fishingLine.Length == 0) { CurrentPlayer.RemoveItemFromBackpack(fishingLine); } CurrentRod.InstallLine(line); RaiseMessage(string.Format("You install {0}m of {1} on {2}", line.Length, line.OriginalName, CurrentRod.Name)); } else { RaiseMessage("Select rod first"); } }
private void Start() { bobRb = bob.GetComponent <Rigidbody>(); spinner = FindObjectOfType <Spinner>(); fishingLine = GetComponentInChildren <FishingLine>(); waterContact = bob.GetComponent <WaterContact>(); bobRb.isKinematic = true; waterContact.fishing = false; canThrow = true; }
private void Start() { boataudio = boat.GetComponent <AudioSource>(); spawnedFish = new List <GameObject>(); line = boat.GetComponent <BoatLine>().Line.GetComponent <FishingLine>(); boatStats = boat.GetComponent <BoatStats>(); zoneHandler = gameObject.GetComponent <ZoneHandler>(); ZoneHandler.SectionChanged += SectionChange; fishCaughtText.text = "Fish Caught 0/" + boatStats.CarryAmount; SectionChange(); }