Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        draws = 10;
        table = GameObject.Find("Table");


        player1Score = 0;
        player2Score = 0;

        player1 = new Player();
        player2 = new Player();

        warManager = Dealer.GetComponent <WarManager>();

        soundScript = soundManager.GetComponent <soundManagerScript>();
    }
    // Start is called before the first frame update
    void Start()
    {
        soundManager = FindObjectOfType <soundManagerScript>();
        startTime    = Time.time;
        washImage    = washingMachine.GetComponent <Image>();

        washImage.enabled = false;

        rect            = washingMachine.GetComponent <RectTransform>();
        rect.localScale = new Vector3(0f, 0f, 0f);

        keySprites = new Sprite[8];
        for (int i = 0; i < 8; i++)
        {
            keySprites[i] = playerKeys[i].sprite;
        }

        c           = new Color(1f, 1f, 1f, alpha);
        timer.speed = 1 / timeLimit;
    }
    public AudioClip[] allSounds;      // creating an audioClip array called allSounds for later in case i want to use more than one sound

    private void Start()               // making sure the manager is listening for events
    {
        Instance = this;               // setting the instance of the object to this
        DontDestroyOnLoad(gameObject); // so when new scene is called the object or audio source in this case will not be destroyed
        SceneManager.LoadScene("Splash");
    }