Esempio n. 1
0
 void lierendie()
 {
     lierensiwang = false;
     GameStage    = "猎人";
     ShowInfo.SetActive(false);
     GameStatus.GetComponent <Text> ().text = "猎人死亡,选择枪杀对象";
     CanClick = true;
 }
Esempio n. 2
0
 void jingzhangdie()
 {
     jingzhangsiwang = false;
     GameStage       = "转移警长";
     ShowInfo.SetActive(false);
     GameStatus.GetComponent <Text> ().text = "警长死亡,请移交警徽";
     CanClick = true;
 }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     //初始化游戏界面
     CanClick = true;
     ConfigUI.SetActive(false);
     PlayerUI.SetActive(false);
     ChoosePlayer.SetActive(false);
     ShowInfo.SetActive(false);
     ShowPlayer.SetActive(false);
     GameStage = "准备开始";
     GameMode  = "Player";
     GameObject.Find("MainCanvas/NextStage").GetComponent <Button> ().interactable = false;
 }
Esempio n. 4
0
 void Stage_taolun()
 {
     GameStage = "讨论";
     ShowInfo.SetActive(false);
     if (day % 2 == 1)
     {
         GameStatus.GetComponent <Text> ().text = "请从警长/死者右手开始发言";
     }
     else
     {
         GameStatus.GetComponent <Text> ().text = "请从警长/死者左手开始发言";
     }
 }
Esempio n. 5
0
 void baitianjiesuan()
 {
     GameStage = "白天结算";
     ShowInfo.SetActive(true);
     jieguo = "";
     if (toupiao == null)
     {
         jieguo = "平安日";
     }
     else
     {
         die(toupiao, "处决");
     }
     GameObject.Find("ShowInfo/Text").GetComponent <Text> ().text = jieguo;
 }
Esempio n. 6
0
 void yewanjiesuan()
 {
     GameStage = "夜晚结算";
     day++;
     jieguo = "";
     diyiye = false;
     if (dusha != null)
     {
         die(dusha, "毒杀");
         dusha = null;
     }
     if (jisha != null)
     {
         //有杀人
         if (shouhu != jisha)
         {
             //没守对
             if (shiyongjieyao)
             {
                 //用解药了
                 jieyaoyongle  = true;
                 shiyongjieyao = false;
             }
             else
             {
                 //没用解药
                 if (jisha.GetComponent <PlayerCard> ().Role == "长老" && shaguozhanglao == false)
                 {
                     //杀到长老第一条命
                     shaguozhanglao = true;
                 }
                 else
                 {
                     die(jisha, "击杀");
                 }
             }
         }
     }
     GameStatus.GetComponent <Text> ().text = "天亮了,昨晚结果为";
     ShowInfo.SetActive(true);
     if (jieguo == "")
     {
         jieguo = "平安夜";
     }
     GameObject.Find("ShowInfo/Text").GetComponent <Text> ().text = jieguo;
 }
Esempio n. 7
0
    void ShowLovers()
    {
        string name1, name2, role1, role2, ID1, ID2;

        Invoke("EnableNextStage", 1.0f);
        GameStage = "情侣";
        if (Toggles [8] == 0 || diyiye == false)
        {
            MoveOn();
            return;
        }
        name1 = Lovers [0].GetComponent <PlayerCard> ().Name;
        name2 = Lovers [1].GetComponent <PlayerCard> ().Name;
        role1 = Lovers [0].GetComponent <PlayerCard> ().Role;
        role2 = Lovers [1].GetComponent <PlayerCard> ().Role;
        ID1   = Lovers [0].GetComponent <PlayerCard> ().PlayerID.ToString();
        ID2   = Lovers [1].GetComponent <PlayerCard> ().PlayerID.ToString();
        GameStatus.GetComponent <Text>().text = "请情侣互看身份";
        ShowInfo.SetActive(true);
        GameObject.Find("ShowInfo/Text").GetComponent <Text> ().text = ID1 + name1 + "和" + ID2 + name2 + "连为了情侣\n" + ID1 + name1 + "的身份是" + role1 + "\n" + ID2 + name2 + "的身份是" + role2;
    }
Esempio n. 8
0
 void MoveOn()
 {
     Invoke("EnableNextStage", 1.0f);
     if (GameStage == "查看身份")
     {
         Stage_qiubite();
         return;
     }
     if (GameStage == "丘比特")
     {
         Stage_langren();
         return;
     }
     if (GameStage == "情侣")
     {
         Stage_langren();
         return;
     }
     if (GameStage == "狼人")
     {
         Stage_nvwu_jieyao();
         return;
     }
     if (GameStage == "女巫解药")
     {
         Stage_nvwu_duyao();
         return;
     }
     if (GameStage == "女巫毒药")
     {
         Stage_shouwei();
         return;
     }
     if (GameStage == "守卫")
     {
         Stage_xianzhi();
         return;
     }
     if (GameStage == "先知")
     {
         if (diyiye)
         {
             diyiye = false;
             Stage_jingzhang();
         }
         else
         {
             yewanjiesuan();
         }
         return;
     }
     if (GameStage == "警长")
     {
         yewanjiesuan();
         return;
     }
     if (GameStage == "夜晚结算")
     {
         if (lierensiwang)
         {
             time = "晚上";
             lierendie();
         }
         else
         {
             if (jingzhangsiwang)
             {
                 time = "晚上";
                 jingzhangdie();
             }
             else
             {
                 Stage_taolun();
             }
         }
         return;
     }
     if (GameStage == "转移警长")
     {
         if (time == "晚上")
         {
             Stage_taolun();
             return;
         }
         if (time == "白天")
         {
             GameStatus.GetComponent <Text>().text        = "天黑请闭眼";
             GoNext.GetComponent <Button> ().interactable = false;
             Invoke("Stage_langren", 3.0f);
             return;
         }
     }
     if (GameStage == "猎人")
     {
         ShowInfo.SetActive(true);
         GameObject.Find("ShowInfo/Text").GetComponent <Text> ().text = jieguo;
         if (time == "晚上")
         {
             GameStage = "夜晚结算";
             return;
         }
         if (time == "白天")
         {
             GameStage = "白天结算";
             return;
         }
         return;
     }
     if (GameStage == "讨论")
     {
         Stage_xuanlangren();
         return;
     }
     if (GameStage == "选狼人")
     {
         baitianjiesuan();
         return;
     }
     if (GameStage == "白天结算")
     {
         if (lierensiwang)
         {
             time = "白天";
             lierendie();
         }
         else
         {
             if (jingzhangsiwang)
             {
                 time = "白天";
                 jingzhangdie();
             }
             else
             {
                 Stage_langren();
             }
         }
         return;
     }
 }
Esempio n. 9
0
    public void NextStage()
    {
        GoNext.GetComponent <Button> ().interactable = false;
        if (GameStage == "查看身份")
        {
            GameStatus.GetComponent <Text>().text = "天黑请闭眼";
            CanClick = false;
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 3.0f);
            return;
        }
        //情侣》狼人
        if (GameStage == "情侣")
        {
            GameStatus.GetComponent <Text> ().text = "情侣请闭眼";
            CanClick = false;
            ShowInfo.SetActive(false);
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 2.0f);
            return;
        }
        //狼人》女巫
        if (GameStage == "狼人")
        {
            jisha = null;
            GameStatus.GetComponent <Text>().text = "狼人请闭眼";
            CanClick = false;
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 2.0f);
            return;
        }
        if (GameStage == "女巫解药")
        {
            CanClick = false;
            Choose_NO();
            return;
        }
        if (GameStage == "女巫毒药")
        {
            dusha = null;
            GameStatus.GetComponent <Text>().text = "女巫请闭眼";
            CanClick = false;
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 2.0f);
            return;
        }
        if (GameStage == "守卫")
        {
            shouhu = null;
            GameStatus.GetComponent <Text>().text = "守卫请闭眼";
            CanClick = false;
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 2.0f);
            return;
        }
        if (GameStage == "先知")
        {
            GameStatus.GetComponent <Text>().text = "先知请闭眼";
            CanClick = false;
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 2.0f);
            return;
        }
        if (GameStage == "警长")
        {
            GameStatus.GetComponent <Text>().text = "警长平票,无警长";
            jingzhang = null;
            CanClick  = false;
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 2.0f);
            return;
        }
        if (GameStage == "夜晚结算")
        {
            GoNext.GetComponent <Button> ().interactable = false;
            CanClick = false;
            MoveOn();
            return;
        }
        if (GameStage == "讨论")
        {
            GoNext.GetComponent <Button> ().interactable = false;
            MoveOn();
            return;
        }
        if (GameStage == "选狼人")
        {
            toupiao = null;
            GoNext.GetComponent <Button> ().interactable = false;
            MoveOn();
            return;
        }
        if (GameStage == "白天结算")
        {
            ShowInfo.SetActive(false);
            if (jingzhangsiwang || lierensiwang)
            {
                MoveOn();
            }
            else
            {
                GameStatus.GetComponent <Text> ().text       = "天黑请闭眼";
                GoNext.GetComponent <Button> ().interactable = false;
                Invoke("MoveOn", 3.0f);
            }

            return;
        }
        if (GameStage == "转移警长")
        {
            GameStatus.GetComponent <Text> ().text = "警徽被撕,无警长";
            jingzhang = null;
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 3.0f);
            return;
        }
        if (GameStage == "猎人")
        {
            GameStatus.GetComponent <Text> ().text       = "猎人放弃";
            GoNext.GetComponent <Button> ().interactable = false;
            Invoke("MoveOn", 2.0f);
            return;
        }
    }