コード例 #1
0
ファイル: EnemyCamera.cs プロジェクト: morwoen/ld48-deeper
    void Start()
    {
        nextLookLocation    = 0;
        currentLookLocation = cameraObject.transform.forward;
        if (inverse)
        {
            currentLookLocation = -currentLookLocation;
        }

        if (lookAtLocations.Length > 0)
        {
            currentLookLocation = lookAtLocations[0].position;
        }

        player      = FindObjectOfType <PlayerController>().gameObject;
        beam        = GetComponentInChildren <SpotlightRenderer>();
        gas         = FindObjectOfType <GlobalAlertSystem>();
        audioSource = GetComponent <AudioSource>();
    }
コード例 #2
0
ファイル: EnemyDetection.cs プロジェクト: morwoen/ld48-deeper
 // Start is called before the first frame update
 void Start()
 {
     player = FindObjectOfType <PlayerController>().gameObject;
     beam   = GetComponentInChildren <SpotlightRenderer>();
     gas    = FindObjectOfType <GlobalAlertSystem>();
 }