Exemple #1
0
    void Start()
    {
        if (myTurtleData.baseAcceleration > 0)
        {
            gameObject.name = myTurtleData.name;
            myEndurance     = myTurtleData.baseEndurance;
            myAcceleration  = myTurtleData.baseAcceleration;
            mySurface       = myTurtleData.favoriteSurface;
        }
        else
        {
            myAcceleration = Random.Range(1, 4);
            myEndurance    = Random.Range(1, 4);
        }
        transform.localScale = new Vector3(1 + (myTurtleData.MyScaleX * 0.01f), 1 + (myTurtleData.MyScaleY * 0.01f), 1);
        RaceResultsColumn1   = "";
        RaceResultsColumn2   = "";
        RaceResultsColumn3   = "";
        RaceResultsColumn4   = "";
        idleCounter          = Random.Range(0, 15);
        usedMats             = "";

        HowManyTurtlesFinished = 0;
        RaceManagerScriptRef   = RaceManagerReference.GetComponent <RaceManager>();
        inRaceResultsText      = RaceManagerScriptRef.inRaceResultsGiuText;
        myAnimator             = gameObject.GetComponent <Animator> ();
        BaseSpeed       += Random.Range(-10, 10) * .01f;
        SpeedChangeTimer = SpeedChangeTickRate;
        oddsGui          = UIOdds.GetComponent <TextMeshProUGUI>();
        //TurtleNamer TurlteNamerScriptRef = RaceManagerReference.GetComponent<TurtleNamer>();
        //gameObject.name = TurlteNamerScriptRef.GiveNewRandomName();
        //gameObject.name = TurlteNamerScriptRef.PossibleNames[Random.Range(0,TurlteNamerScriptRef.PossibleNames.Length -1)];
        UIName.GetComponent <TextMeshProUGUI>().text = gameObject.name;
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        RaceResultsColumn1 = "";
        RaceResultsColumn2 = "";
        RaceResultsColumn3 = "";
        idleCounter        = Random.Range(0, 15);
        usedMats           = "";

        HowManyTurtlesFinished = 0;
        RaceManagerScriptRef   = RaceManagerReference.GetComponent <RaceManager>();
        myAnimator             = gameObject.GetComponent <Animator> ();
        BaseSpeed       += Random.Range(-10, 10) * .01f;
        SpeedChangeTimer = SpeedChangeTickRate;
        oddsGui          = UIOdds.GetComponent <TextMeshProUGUI>();
        //TurtleNamer TurlteNamerScriptRef = RaceManagerReference.GetComponent<TurtleNamer>();
        //gameObject.name = TurlteNamerScriptRef.GiveNewRandomName();
        //gameObject.name = TurlteNamerScriptRef.PossibleNames[Random.Range(0,TurlteNamerScriptRef.PossibleNames.Length -1)];
        UIName.GetComponent <TextMeshProUGUI>().text = gameObject.name;
    }