Example #1
0
    public void MoveToIsland()
    {
        if (!current || otherPeople.Contains(selectionManager.GetSelected()))
        {
            return;
        }

        islandContent.AddToPanel(current);
        crewContent.ReadjustPanel();

        CrewMember selected = selectionManager.GetSelected();

        playerShip.Unassign(selected);
        selected.isPlayerCrew = false;
        otherPeople.Add(selected);
        selected.BeginPath(AStar.FindPath(selected.current, beach.GetRandomTile(), true));
    }
Example #2
0
    public void MoveToCrew()
    {
        if (!current || playerShip.crewMembers.Contains(selectionManager.GetSelected()))
        {
            return;
        }

        if (playerShip.crewMembers.Count < playerShip.GetMaxCrewMembers())
        {
            crewContent.AddToPanel(current);
            islandContent.ReadjustPanel();

            CrewMember selected = selectionManager.GetSelected();
            otherPeople.Remove(selected);
            selected.isPlayerCrew = true;
            playerShip.Assign(selected, playerShip.GetVacantPositionByPriority(), true);
        }
    }