Пример #1
0
    //コンパスを確認して向きを変えたい
    private void CompassCheck()
    {
        FirstPosi();
        switch (compass)
        {
        case 0:
            North.SetActive(true);
            Desk.gameObject.SetActive(true);
            Desk_Left.gameObject.SetActive(true);
            Desk_Right.gameObject.SetActive(true);
            deskscreen = 0;
            itemgetcs.North_Item();
            break;

        case 1:
            East.SetActive(true);
            itemgetcs.East_Item();
            break;

        case 2:
            South.SetActive(true);
            itemgetcs.South_Item();
            break;

        case 3:
            West.SetActive(true);
            itemgetcs.West_Item();
            break;
        }
    }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     //ボタンの有効・無効設定
     North.SetActive(true);
     East.SetActive(false);
     South.SetActive(false);
     West.SetActive(false);
     //ボタンを押したときの動作
     Left.onClick.AddListener(Left_Click);
     Right.onClick.AddListener(Right_Click);
 }
Пример #3
0
 private void FirstPosi()
 {
     North.SetActive(false);
     North_Open.SetActive(false);
     East.SetActive(false);
     South.SetActive(false);
     West.SetActive(false);
     Desk.gameObject.SetActive(false);
     Desk_Left.gameObject.SetActive(false);
     Desk_Right.gameObject.SetActive(false);
 }
Пример #4
0
    //コンパスを確認して向きを変えたい
    private void CompassCheck()
    {
        switch (compass)
        {
        case 0:
            North.SetActive(true);
            East.SetActive(false);
            South.SetActive(false);
            West.SetActive(false);
            Debug.Log("North");
            break;

        case 1:
            North.SetActive(false);
            East.SetActive(true);
            South.SetActive(false);
            West.SetActive(false);
            Debug.Log("East");
            break;

        case 2:
            North.SetActive(false);
            East.SetActive(false);
            South.SetActive(true);
            West.SetActive(false);
            Debug.Log("South");
            break;

        case 3:
            North.SetActive(false);
            East.SetActive(false);
            South.SetActive(false);
            West.SetActive(true);
            Debug.Log("West");
            break;
        }
    }