コード例 #1
0
 private void Start()
 {
     currentHealth = maxHealth;
     GM            = GameObject.Find("GameManager").GetComponent <GameManager>();
     player        = GetComponent <Player>();
     healtBar      = GameObject.FindGameObjectWithTag("HealthBar").GetComponent <HealtBar>();
     healtBar.SetMaxHealth(maxHealth);
 }
コード例 #2
0
 void Start()
 {
     rigidBody = GetComponent <Rigidbody2D>();
     healthbar.SetMaxHealth(maxHealth);
     animator.SetFloat("VelocityY", -1);
 }