public bool ExploreItems(int row, int col) { Items item = GameConst.items[row, col]; if (item != null) { PlayerExploreBox exploreBox = GetComponent <PlayerExploreBox>(); if (exploreBox.BoxInline(item.GetComponent <ItemBox>())) { return(true); } } return(false); }
public void checkCollisionOtherOne() { PlayerExploreBox exploreBox = GetComponent <PlayerExploreBox>(); foreach (RobotInputController robot in GameGlobalData.robotList.Values) { PlayerExploreBox robotBox = robot.GetComponent <PlayerExploreBox>(); if (exploreBox.BoxInline(robotBox)) { if (CanSave(robot)) { Debug.Log("YES"); waitList.Add(robot.fd); inputController.SaveOne(robot); } else if (CanKill(robot)) { Debug.Log("YES"); waitList.Add(robot.fd); inputController.KillOne(robot); } } } }