コード例 #1
0
 private void Awake()
 {
     mycharacterAnimationsScript = GetComponentInChildren <MyCharacterAnimations>();
     if (is_Player)
     {
         healthUI = GetComponent <HealthUI>();
     }
 }
コード例 #2
0
    private void Awake()
    {
        MyCharacterAnimations = GetComponentInChildren <MyCharacterAnimations>();

        audioSource = GetComponent <AudioSource>();

        if (gameObject.CompareTag(Tags.ENEMY_TAG))
        {
            enemyMovements = GetComponentInParent <EnemyMovements>();
        }
        cameraShake = GameObject.FindWithTag(Tags.MAIN_CAMERA_TAG).GetComponent <CameraShake>();
    }
コード例 #3
0
 void Awake()
 {
     animations = GetComponentInChildren <MyCharacterAnimations>();
 }
コード例 #4
0
 void Awake()
 {
     EnemyAnim    = GetComponentInChildren <MyCharacterAnimations>();
     myBody       = GetComponent <Rigidbody>();
     playerTarget = GameObject.FindWithTag(Tags.PLAYER_TAG).transform;
 }