コード例 #1
0
 // Start is called before the first frame update
 void Start()
 {
     if (instance != null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
     }
     heathbar.SetMaxHealth(maxPlayerHealth);
 }
コード例 #2
0
ファイル: EnemyBullet.cs プロジェクト: hemunt/SAI-MAN-FINAL
 // Start is called before the first frame update
 void Start()
 {
     Player   = GameObject.FindGameObjectWithTag("Player").transform;
     Target   = new Vector2(Player.position.x, Player.position.y);
     instance = GameObject.FindGameObjectWithTag("GPC").GetComponent <GamePlayeController>();
 }