Example #1
0
    // Use this for initialization
    void Start()
    {
        ButtonSpez1 = GameObject.Find("Button Spezial 1");
        ButtonSpez2 = GameObject.Find("Button Spezial 2");

        if (PlayerPrefs.HasKey(spezName1))
        {
            ButtonSpez1.GetComponent <Button>().onClick.AddListener(delegate { SpezialSelect(PlayerPrefs.GetInt(spezName1)); });
        }
        else
        {
            PlayerPrefs.SetInt(spezName1, 0);
        }
        if (PlayerPrefs.HasKey(spezName2))
        {
            ButtonSpez2.GetComponent <Button>().onClick.AddListener(delegate { SpezialSelect(PlayerPrefs.GetInt(spezName2)); });
        }
        else
        {
            PlayerPrefs.SetInt(spezName2, 1);
        }


        shootScript = GetComponent <ShootMainShip>();
    }
Example #2
0
    void Start()
    {
        playerShip = GameObject.FindGameObjectWithTag("Player");
        shootUpZone.SetActive(false);
        shootDownZone.SetActive(false);
        shootScript         = playerShip.GetComponent <ShootMainShip>();
        shootScript.enabled = false;
        npcScript           = GetComponent <SpawnNPCShips>();
        tutText             = tutStuff.transform.GetChild(0).transform.GetChild(0).GetComponent <Text>();
        textPanel           = tutStuff.transform.GetChild(0).gameObject;
        arrows    = new Image[tutStuff.transform.childCount - 1];
        endscreen = GetComponent <EndScreen>();
        for (int i = 0; i < arrows.Length; i++)
        {
            arrows[i] = tutStuff.transform.GetChild(i + 1).GetComponent <Image>();
        }

        next      = false;
        npcDead   = false;
        indexText = 0;
        StartCoroutine(Tut1());
    }