public void ItemClick(ItemControl itemCtrl) { Debug.Log("ItemClick"); if (itemCtrl.isOnBoat) { ShoreControl side; if (boat.status == 1) { side = fromShore; } else { side = toShore; } Debug.Log(side.GetEmptyPosition()); boat.GetOffBoat(itemCtrl); //itemCtrl.MoveTo(side.GetEmptyPosition()); MyActionManager.MoveItem(itemCtrl, side.GetEmptyPosition()); // add in v2 itemCtrl.GetOnShore(side); side.GetOnShore(itemCtrl); user.step++; } else { if (boat.IsFull()) { return; } Debug.Log(itemCtrl.item.name + " getting on boat"); ShoreControl side = itemCtrl.shoreCtrl; if (side.status != boat.status) { return; } side.GetOffShore(itemCtrl.item.name); //Debug.Log(MyActionManager); //Debug.Log(itemCtrl); //Debug.Log(boat); //itemCtrl.MoveTo(boat.GetOnBoat(itemCtrl)); MyActionManager.MoveItem(itemCtrl, boat.GetOnBoat(itemCtrl)); // add in v2 itemCtrl.GetOnBoat(boat); user.step++; } user.status = Check(); }