コード例 #1
0
ファイル: HpBarTest.cs プロジェクト: itsedaff/Tank-Wars
 IEnumerator MinsHPBar()
 {
     hpbar.SetSize(hp);
     hp -= 0.1f;
     Debug.Log("My hp is" + hp);
     yield return(new WaitForSeconds(loadTime));
 }
コード例 #2
0
ファイル: HpController.cs プロジェクト: itsedaff/Tank-Wars
    public void RedTank3Hp(int x)
    {
        float y = (float)x;

        y = (x / 100f);
        //Debug.Log("y is " + y);
        redTank3Hp.SetSize((float)y);
    }
コード例 #3
0
ファイル: HpController.cs プロジェクト: itsedaff/Tank-Wars
    public void BlueTank3Hp(int x)
    {
        //Debug.Log("Blue Tanks1hp was called and hp was passed in " + x);
        float y = (float)x;

        y = (x / 100f);
        //Debug.Log("after x was normalized y is " + y);
        //Debug.Log("y is " + y);
        blueTank3Hp.SetSize((float)y);
    }