Beispiel #1
0
 public ReadyScript(ReadyScript rs)
 {
     textN = rs.textN;
     textC = rs.textC;
     textS = rs.textS;
     textP = rs.textP;
     textR = rs.textR;
     textY = rs.textY;
 }
    void Start()
    {
        respawnPos = transform.position;

        rotateSpeed = 450f;

        if (this.tag == "Blue")
        {
            otherPlayer = GameObject.Find("PlayerR");
        }
        else if (this.tag == "Red")
        {
            otherPlayer = GameObject.Find("PlayerB");
        }

        motor = hinge.motor;

        shootJumpB = 0;
        shootJumpR = 0;

        scoreLimit = PlayerPrefs.GetInt("SetPoints");

        buttonScriptR = buttonR.GetComponent <Button>();
        buttonScriptB = buttonB.GetComponent <Button>();

        score       = GameObject.Find("Score");
        scoreScript = score.GetComponent <ScoreScript>();

        readyScript = readyText.GetComponent <ReadyScript>();

        isReadyScriptGoing = false;

        sceneSaver       = GameObject.Find("SceneSaver");
        sceneSaverScript = sceneSaver.GetComponent <SceneSaver>();

        canGround = true;
    }