void OnTriggerExit(Collider other) { if (!player.IsOnBoat) { showingGetInBoat = false; Jyx2InteractiveButton.Hide(); } }
void OnTriggerEnter(Collider other) { if (!player.IsOnBoat) { showingGetInBoat = true; Jyx2InteractiveButton.Show("上船", GetInBoat); } }
//下船 public void GetOutBoat() { if (player.GetOutBoat()) { Jyx2InteractiveButton.Hide(); } else { GameUtil.DisplayPopinfo("此处不能靠岸!"); } }
//上船 public void GetInBoat() { player.GetInBoat(this); showingGetInBoat = false; Jyx2InteractiveButton.Show("上岸", GetOutBoat); }