Exemplo n.º 1
0
    public bool actingCheck(Crewman crewman)//행동을 하는지, 행동을 하면 false, 안하면 true
    {
        //if( Acting.NOTHING == crewman.whatActing())
        //{
        //    return true;
        //}

        if (crewman.getActingType() == Acting.NOTHING || crewman.getActingType() == Acting.DRIVE)
        {
            return(true);
        }

        UIManager.Instance.showMessage("다른 행동을 하는중입니다.");
        return(false);
    }
Exemplo n.º 2
0
    private void refreshCrewUI(int crewIndex)
    {
        // 선원 데이터를 가져와서 UI 갱신

        Crewman _crew = CrewmanManager.Instance.getCrewman(crewIndex);

        crewUIs[crewIndex].setNowActMark(actingEnumToString(_crew.getActingType()));
        crewUIs[crewIndex].setActGauge(_crew.getbehavior());
        crewUIs[crewIndex].setHungerGauge(_crew.getfull());

        crewStatusUIs[crewIndex].setCrewNowActText(actingEnumToString(_crew.getActingType()));
        crewStatusUIs[crewIndex].setLeftActText(10, _crew.getbehavior());
        crewStatusUIs[crewIndex].setHungerText(4, _crew.getfull());
        crewStatusUIs[crewIndex].setCrewJobText(getCrewJob(_crew));
    }
Exemplo n.º 3
0
    public void showSelectMenu(int index)
    {
        Crewman _crew = CrewmanManager.Instance.getCrewman(index);

        if (_crew.getActingType() == Acting.NOTHING || _crew.getActingType() == Acting.DRIVE)
        {
            Vector2 _size = selectMenu.GetComponent <RectTransform>().sizeDelta;

            CanvasScaler scaler = myCanvas.GetComponentInParent <CanvasScaler>();
            selectMenu.GetComponent <RectTransform>().anchoredPosition
                = new Vector2(Input.mousePosition.x * scaler.referenceResolution.x / Screen.width - scaler.referenceResolution.x / 2 + _size.x / 2,
                              Input.mousePosition.y * scaler.referenceResolution.y / Screen.height - scaler.referenceResolution.y / 2 + _size.y / 2);

            selectMenu.SetActive(true);
            showCrewHighlight(index);

            selectCrewIndex = index;
        }
    }