Inheritance: MonoBehaviour
Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        score = 0;
        track = (MoveBackground)FindObjectOfType(typeof(MoveBackground));
        InvokeRepeating("updateScore", 1.0f, 0.1f);

        animator = GetComponent <Animator>();
    }
Ejemplo n.º 2
0
 /// <summary>
 /// start timers method
 /// </summary>
 private void StartTimers()
 {
     MoveBackground.Start();
     RightTimer.Start();
     LeftTimer.Start();
     MoveEnemiesTimer.Start();
     MunitionTimer.Start();
     EnemiesMunitionTimer.Start();
 }
    // Start is called before the first frame update
    void Start()
    {
        redLight    = GameObject.Find("RedLight").GetComponent <Light>();
        greenLight  = GameObject.Find("Green Light").GetComponent <Light>();
        yellowLight = GameObject.Find("Yellow Light").GetComponent <Light>();
        videoPlayer = GameObject.Find("Video Player");
        videoPlayer.SetActive(false);

        inhalationScript     = GameObject.FindObjectOfType <InhalationScript>();
        exhalationScript     = GameObject.FindObjectOfType <ExhalationSound>();
        moveBackgroundScript = GameObject.FindObjectOfType <MoveBackground>();
        terrainStopper       = GameObject.Find("Terrain").GetComponent <MoveBackground>();

        breatheInText  = GameObject.Find("BreatheInText");
        breatheOutText = GameObject.Find("BreatheOutText");
        note1          = GameObject.Find("Note1");
        note2          = GameObject.Find("Note2");
        note3          = GameObject.Find("Note3");
        note4          = GameObject.Find("Note4");
        note5          = GameObject.Find("Note5");
        note6          = GameObject.Find("Note6");
        note7          = GameObject.Find("Note7");
        note8          = GameObject.Find("Note8");

        breatheInText.SetActive(false);
        breatheOutText.SetActive(false);
        note1.SetActive(false);
        note2.SetActive(false);
        note3.SetActive(false);
        note4.SetActive(false);
        note5.SetActive(false);
        note6.SetActive(false);
        note7.SetActive(false);
        note8.SetActive(false);

        theSong = GameObject.Find("Hey Jude Audio").GetComponent <AudioSource>();
    }
Ejemplo n.º 4
0
 private void Start()
 {
     moveBackground = Plane.GetComponent <MoveBackground>();
 }
Ejemplo n.º 5
0
    private int width  = 16; // Количество врагов в ширину.

    private void Start()
    {
        moveBackground = FindObjectOfType <MoveBackground>();

        LoadingEnemies();
    }
Ejemplo n.º 6
0
 void Start()
 {
     track     = (MoveBackground)FindObjectOfType(typeof(MoveBackground));
     enemySpan = (SpawnEnemies)FindObjectOfType(typeof(SpawnEnemies));
     position  = transform.position;
 }