Beispiel #1
0
        //=====================================
        // update
        //=====================================
        public void updateDraw(bool first)
        {
            night1.SetActive(false);
            night2.SetActive(false);

            var myp = GameFactory.getGame().getMyPlayer();

            if (myp.state == game.db.PLAYER_STATE.NONE)
            {
                night1.SetActive(true);
            }
            else if (myp.state == game.db.PLAYER_STATE.NIGHT_VOTE)
            {
                night2.SetActive(true);

                night_chara.clear();
                night_chara.add("投票しない", -1);
                foreach (var p in GameFactory.getGame().shareData.players.players)
                {
                    if (p.fdead)
                    {
                        continue;
                    }
                    night_chara.add("" + p.name, p.id);
                }
                night_chara.updateDraw(first);
            }
        }
Beispiel #2
0
 private void updateMidnight1(bool first)
 {
     {
         var myp = GameFactory.getGame().getMyPlayer();
         mid1_item.clear();
         mid1_item.add("使用しない", -1);
         for (int i = 0; i < myp.items.Length; i++)
         {
             if (myp.getItem(i) == game.db.ITEM.NONE) continue;
             mid1_item.add("" + myp.getItemStr(i), i);
         }
         mid1_item.updateDraw(first);
     }
     {
         mid1_chara.clear();
         foreach (var p in GameFactory.getGame().shareData.players.players)
         {
             if ( p.id == GameFactory.getGame().localData.myPlayer) continue;
             mid1_chara.add(""+p.name , p.id);
         }
         mid1_chara.updateDraw(first);
     }
 }
Beispiel #3
0
        //--------------------------------------------------
        // draw
        //--------------------------------------------------
        public void updateDraw(bool first)
        {
            noon1.SetActive(false);
            noon2.SetActive(false);
            noon3.SetActive(false);
            noon4.SetActive(false);

            var myp = GameFactory.getGame().getMyPlayer();

            if (myp.state == game.db.PLAYER_STATE.NOON_END)
            {
                //終了
            }
            else if (myp.state == game.db.PLAYER_STATE.NONE)
            {
                // 選択画面
                noon1.SetActive(true);

                noon1_chara.clear();
                foreach (var p in GameFactory.getGame().shareData.players.players)
                {
                    if (p.id == GameFactory.getGame().localData.myPlayer)
                    {
                        continue;
                    }
                    if (p.state == game.db.PLAYER_STATE.NOON_END)
                    {
                        continue;
                    }

                    noon1_chara.add("" + p.name, p.id);
                }
                noon1_chara.updateDraw(first);
            }
            else if (myp.state == game.db.PLAYER_STATE.NOON_WAIT_ACK)
            {
                //待ち
                noon2.SetActive(true);
            }
            else if (myp.state == game.db.PLAYER_STATE.NOON_REQUEST_RETURN)
            {
                //返答
                noon3.SetActive(true);

                var opp_id = GameFactory.getGame().getMyPlayer().net_opp;
                var opp    = GameFactory.getGame().shareData.players.getPlayer(opp_id);
                GameObject.Find("Canvas/Noon/Noon3/opp_text").GetComponent <Text>().text = opp.name + "から交換要望がありました";
            }
            else if (myp.state == game.db.PLAYER_STATE.NOON_ITEM)
            {
                //アイテム選択
                noon4.SetActive(true);

                noon4_item.clear();
                for (int i = 0; i < myp.items.Length; i++)
                {
                    if (myp.getItem(i) == game.db.ITEM.MURDERE_KNIFE)
                    {
                        continue;
                    }
                    if (myp.getItem(i) == game.db.ITEM.NONE)
                    {
                        continue;
                    }
                    noon4_item.add("" + myp.getItemStr(i), i);
                }
                noon4_item.updateDraw(first);
            }
        }