Пример #1
0
 public EndScreen Initialize(RoachCount roachCount, SpaceRoaches spaceRoaches)
 {
     if (roachCount == null)
     {
         return(this);
     }
     _roachCount          = roachCount;
     _spaceRoaches        = spaceRoaches;
     _textCount           = GetComponentsInChildren <Text>(true)[0];
     _textComment         = GetComponentsInChildren <Text>(true)[1];
     _typeWriting         = gameObject.AddComponent <TypeWriting>();
     _selectEndScreenText = new SelectEndScreenText();
     return(this);
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        environmentAudioSource = GameObject.Find("/Environment").GetComponent <AudioSource>();
        initialClip            = environmentAudioSource.clip;

        earthTypeWriting = earth.GetComponentInChildren <TypeWriting>();
        earthAnimator    = earth.GetComponentInChildren <Animator>();


        flagTypeWriting = flag.GetComponentInChildren <TypeWriting>();
        flagAnimator    = flag.GetComponentInChildren <Animator>();

        moduleTypeWriting = module.GetComponentInChildren <TypeWriting>();
        moduleAnimator    = module.GetComponentInChildren <Animator>();
    }