void Awake()
 {
     gameIntro        = GetComponentInParent <GameIntro>();
     movie            = (MovieTexture)GetComponent <RawImage>().mainTexture;
     audioSource      = GetComponent <AudioSource>();
     audioSource.clip = movie.audioClip;
 }
    /// <summary>
    /// Update the game
    /// </summary>
    protected override void OnUpdate()
    {
        if (m_UIIntro == null)
        {
            m_UIIntro = GameObject.FindObjectOfType <GameIntro>();
            if (m_UIIntro == null)
            {
                return;
            }
        }

        m_UIIntro.Play(LbConstants.IntroTime);
        EntityManager.DestroyEntity(m_Query);

        var entity = EntityManager.CreateEntity();

        EntityManager.AddComponentData(entity, new LbGameWaitForSpawn()
        {
            Value = LbConstants.IntroTime
        });
    }
Esempio n. 3
0
 private void Awake()
 {
     gameIntro = transform.GetComponentInParent <GameIntro>();
 }