コード例 #1
0
 //Load all scripts that will be controlled by scene flow controller
 void GetScripts()
 {
     audioCS        = GameObject.FindGameObjectWithTag("AudioController").GetComponent <AudioControlScript>();
     dialogueScript = dialogueUI.GetComponent <DialogueHandler>();
     mapScript      = GameObject.FindGameObjectWithTag("GameController").GetComponent <OverworldMapControl>();
     camScript      = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MapCameraController>();
 }
コード例 #2
0
ファイル: ScoreManager.cs プロジェクト: AntShestak/CandyDemo
 // Start is called before the first frame update
 void Start()
 {
     //get reference to audio
     m_audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioControlScript>();
     //get reference to Canvas controller
     m_canvas = GameObject.FindGameObjectWithTag("Canvas").GetComponent <CanvasController>();
 }
コード例 #3
0
 void Awake()
 {
     sceneFC     = GameObject.FindGameObjectWithTag("GameController").GetComponent <SceneFlowController>();
     audioCS     = GameObject.FindGameObjectWithTag("AudioController").GetComponent <AudioControlScript>();
     lDefaultPos = lPortPos = leftPortrait.rectTransform.anchoredPosition;
     rDefaultPos = rPortPos = rightPortrait.rectTransform.anchoredPosition;
     ConstructDicts();
     Reset();
 }
コード例 #4
0
ファイル: AnvilScript.cs プロジェクト: AntShestak/CandyDemo
    bool m_isPlayerKilled = false;            //flag

    private void Start()
    {
        m_audioSource = GetComponent <AudioSource>();
        //play sound with slight delay
        Invoke("PlaySound", 0.25f);
        m_audioScript = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioControlScript>();

        //get particles
        m_ps = GetComponentsInChildren <ParticleSystem>();
    }
コード例 #5
0
 private void Start()
 {
     m_audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioControlScript>();
 }