コード例 #1
0
ファイル: Attacking.cs プロジェクト: teamdynam1te/climbtime
 void Start()
 {
     plr        = GameObject.FindGameObjectWithTag("Player");
     plrH       = plr.GetComponent <playerHealth>();
     anim       = this.gameObject.GetComponent <Animator>();
     gm         = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     enemyMove  = GetComponentInParent <enemymovement>();
     playerMove = plr.GetComponent <Player>();
 }
コード例 #2
0
ファイル: enemyhealth.cs プロジェクト: teamdynam1te/climbtime
 // Start is called before the first frame update
 void Start()
 {
     currenthealth = Enemymaxhealth;
     spwn          = GameObject.FindGameObjectWithTag("SkelSpawner").GetComponent <MainSpawner>();
     collider      = GetComponent <Collider2D>();
     dropAmount    = Random.Range(minDrop, maxDrop);
     anim          = this.gameObject.GetComponent <Animator>();
     move          = this.gameObject.GetComponent <enemymovement>();
 }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     enemyscript = enemy.GetComponent <enemymovement>();
 }