コード例 #1
0
 public void Start()
 {
     block              = GameObject.Find("Block");
     durability         = block.GetComponent <DurabilityManager>();
     healthBar          = transform.FindChild("HealthBar").gameObject;
     currentHealthImage = healthBar.transform.FindChild("CurrentHealth").GetComponent <Image>();
     healthText         = healthBar.transform.FindChild("Text").GetComponent <Text>();
 }
コード例 #2
0
    // Start is called before the first frame update

    private void Start()
    {
        DM = GetComponentInParent <DurabilityManager>();
    }