コード例 #1
0
ファイル: Damager.cs プロジェクト: Jakoban2411/Rundown-
 private void OnTriggerEnter2D(Collider2D collision)
 {
     ObjectDamage = collision.gameObject.GetComponent <DamageSystrm>();
     if (ObjectDamage != null)
     {
         ObjectDamage.Damage(Damage);
         Destroy(gameObject);
     }
 }
コード例 #2
0
ファイル: UIManager.cs プロジェクト: Jakoban2411/Rundown-
 // Use this for initialization
 void Start()
 {
     Manager              = FindObjectOfType <AIMoveDecision>();
     PlaneManager         = FindObjectOfType <PlaneAIDecision>();
     Resume.enabled       = false;
     PlaneManager.enabled = false;
     Manager.enabled      = false;
     PlayerScript         = FindObjectOfType <PlayerMovement>();
     PlayerScript.enabled = false;
     Clampers             = GameObject.FindGameObjectWithTag("Container");
     Player       = PlayerScript.gameObject;
     PlayerDamage = Player.GetComponent <DamageSystrm>();
     BGMSource    = GetComponent <AudioSource>();
     BGMSource.Stop();
     Started = false;
     Clampers.SetActive(false);
     PlayerScript.Health.SetActive(false);
     TimeScore = gameObject.transform.Find("HighScore").transform.GetChild(0).GetComponent <Text>();
     DontDestroyOnLoad(TimeScore);
 }