コード例 #1
0
ファイル: ZombieAI.cs プロジェクト: cihatsnl34/ZombieKiller
    void Start()
    {
        zombieHP     = GetComponent <ZombieHP>();
        zombieState  = ZombieState.Idle;
        animator     = GetComponent <Animator>();
        navMesh      = GetComponent <NavMeshAgent>();
        PlayerObject = GameObject.FindWithTag("Player");
        hpPlayer     = PlayerObject.GetComponent <HpPlayer>();
        DoorObject   = GameObject.FindWithTag("door");

        sceneID = SceneManager.GetActiveScene().buildIndex;
    }
コード例 #2
0
 void Start()
 {
     hp = HpPlayer.FindObjectOfType <HpPlayer>();
 }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     hpPlayer = GetComponent <HpPlayer>();
     camera   = GetComponent <Camera>();
 }