コード例 #1
0
 private void Start()
 {
     myRigidbody    = GetComponent <Rigidbody2D>();
     player         = FindObjectOfType <PlayerMovement>();
     goblinBoss     = FindObjectOfType <GoblinBossAttack>().GetComponent <GoblinBossAttack>();
     playerPosition = player.transform.position;
 }
コード例 #2
0
 void Start()
 {
     goblinBossAttack = GetComponent <GoblinBossAttack>();
     startXScale      = transform.localScale.x;
     playerPoistion   = player.position;
     myRigidbody      = GetComponent <Rigidbody2D>();
     myAnimator       = GetComponent <Animator>();
 }
コード例 #3
0
ファイル: Health.cs プロジェクト: iamvkosarev/DungeonsCleanup
 private void Start()
 {
     myAudioSource = GetComponent <AudioSource>();
     myRB          = GetComponent <Rigidbody2D>();
     firstHealth   = health;
     animator      = GetComponent <Animator>();
     goblinBoss    = FindObjectOfType <GoblinBossAttack>();
 }
コード例 #4
0
    // Start is called before the first frame update

    public void SetBoss(GoblinBossAttack goblinBossAttack)
    {
        goblinBoss           = goblinBossAttack;
        startNumberOfGrounds = goblinBoss.numberOfGrounds;
        StartCoroutine(StartAttack());
    }