// *** Public Methods *** //

    public void Start()
    {
        source    = GetComponent <AudioSource>();
        ropeModel = FindObjectOfType <RopeModel>();

        score    = 0;
        maxScore = CalculateMaxScore();
        SetScoreText();

        // Timer
        InvokeRepeating("DecreaseTimeRemaining", 1.0f, 1.0f);
    }
    // *** Public Methods *** //
    public void Start()
    {
        source = GetComponent<AudioSource>();
        ropeModel = FindObjectOfType<RopeModel>();

        score = 0;
        maxScore = CalculateMaxScore();
        SetScoreText();

        // Timer
        InvokeRepeating ("DecreaseTimeRemaining", 1.0f, 1.0f);
    }
Beispiel #3
0
 void Start()
 {
     // the parent of each rope fragment would be the overall Rope object, containing
     // the RopeModel script component, so we retrieve it here
     ropeModel = transform.parent.GetComponent <RopeModel>();
 }
 void Start()
 {
     // the parent of each rope fragment would be the overall Rope object, containing
     // the RopeModel script component, so we retrieve it here
     ropeModel = transform.parent.GetComponent<RopeModel>();
 }