Ejemplo n.º 1
0
 /// <summary>
 /// Game over.
 /// </summary>
 public void GameOver()
 {
     GameObject.FindGameObjectWithTag("GameOver").GetComponent <Image> ().enabled = true;
     naviControl.ShowNavi("ゲームオーバー", 3, "");
     Destroy(shield.gameObject);
     StartCoroutine(MoveScene(1));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// MPが足りるかどうかをチェックする
 /// </summary>
 /// <returns><c>true</c>, if M p enough was checked, <c>false</c> otherwise.</returns>
 /// <param name="MP">MP</param>
 /// <param name="cost">Need MP</param>
 bool Check_MP_enough(ref float MP, float cost)
 {
     cost -= (int)(cost * (playerStatus.costDownRate / 100));
     if (MP < cost)
     {
         naviControl.ShowNavi("MP不足", 2, "");
         return(false);
     }
     else
     {
         MP -= cost;
         return(true);
     }
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     p_HP_slider.maxValue = p_HP;
     p_HP_slider.value    = p_HP;
     p_MP_slider.maxValue = p_MP;
     p_MP_slider.value    = p_MP;
     if (LoadLevel.Instance != null)
     {
         LoadLevel.Instance.LoadStatus();
     }
     nowMP       = p_MP;
     naviControl = GameObject.Find("GameRoot").GetComponent <NaviControl> ();
     naviControl.ShowNavi("ゲーム開始", 3, "");
     StartCoroutine(CheckMP());
 }
 /// <summary>
 /// クリア
 /// </summary>
 public void StageClear()
 {
     if (this.tag == "Boss")
     {
         Debug.Log("win");
         playerStatus.isWin = true;
         GameObject.FindGameObjectWithTag("ClearImage").GetComponent <Image>().enabled = true;
         naviControl.ShowNavi("ゲームクリア", 3, "");
         StartCoroutine(MoveScene(1));
     }
     else
     {
         DestroyMonster();
     }
 }
Ejemplo n.º 5
0
 // Update is called once per frame
 void Update()
 {
     if (coolDown != 0)
     {
         if (isCoolDown)
         {
             timer += Time.deltaTime;
         }
         if (timer >= coolDown)
         {
             naviControl.ShowNavi("準備完了", 2, this.gameObject.name);
             btn.interactable = true;
             isCoolDown       = false;
             timer            = 0;
         }
     }
 }
Ejemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     naviControl = GameObject.Find("GameRoot").GetComponent <NaviControl>();
     naviControl.ShowNavi(this.gameObject.name, 3, "");
 }