Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        ep = Squid.GetComponent <EnemyParameter>();


        if (ep.hp <= (SquidSc.GetHp() / 2))
        {
            material.SetFloat(propID_h, 0.45f);
        }



        Tentacle_Y += i;
        if (Tentacle_Y > 5.0f)
        {
            // 反転
            i = -0.12f;
        }
        if (Tentacle_Y < -7.0f)
        {
            Destroy(this.gameObject);
        }

        this.gameObject.transform.position = new Vector3(this.transform.position.x, Tentacle_Y, this.transform.position.z);
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        Squid = GameObject.Find("Squid");

        SquidSc = Squid.GetComponent <Squid>();

        slider.maxValue = SquidSc.GetHp();
    }
Ejemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (AniCnt <= 50)
        {
            AniCnt++;
        }
        else
        {
            Hpani.SetActive(false);
            HpFrame.SetActive(true);
            sliderObj.SetActive(true);
        }



        // HPゲージに値を設定
        slider.value = SquidSc.GetEp().hp;



        Debug.Log(SquidSc.GetEp().hp);
        Debug.Log(SquidSc.GetHp());
    }