Ejemplo n.º 1
0
    public void setDefaultLevel(float argsLevel)
    {
        _defaultLevel = argsLevel;
        thisEnemyStat = new typeEnemyStatus(argsLevel, _defaultEnemyType);

        textureVector ttv = new textureVector(this.gameObject);

        hpBar.setMaxBarLength_argsWidth(ttv.getWidth(animeScalingFlag), thisEnemyStat.maxHP);
    }
Ejemplo n.º 2
0
    public void createHPBar()
    {
        //HP Barの作成
        if (hpBar != null)
        {
            Destroy(hpBar.gameObject);
        }

        GameObject tmpHpbarGO = Instantiate(_HPBar) as GameObject;

        tmpHpbarGO.transform.parent = this.transform;

        tmpHpbarGO.transform.localPosition = Vector3.zero;
        //位置補正
        textureVector ttv  = new textureVector(this.gameObject);
        Vector3       tmpV = ttv.getBottomOffset_ForCenterPivot(0, -0.05f, animeScalingFlag);

        tmpHpbarGO.transform.localPosition += tmpV;

        hpBar = tmpHpbarGO.GetComponent <enemyHPBarScript>();
        hpBar.setMaxBarLength_argsWidth(ttv.getWidth(animeScalingFlag), thisEnemyStat.maxHP);
    }