Exemplo n.º 1
0
 void Start()
 {
     Input.multiTouchEnabled = true;
     ggm   = GlobalGameManager.instance;
     lc    = GameObject.Find("LevelController").GetComponent <LevelController>();
     staff = ggm.GetStaff();
     Instantiate(staff, handRight.transform);
     PopulateSkins();
     maxVelocity     = ggm.GetMaxVelocity();
     minVelocity     = ggm.GetMinVelocity();
     acceleration    = ggm.GetAcceleration();
     gravity         = ggm.GetGravity();
     jumpHeight      = ggm.GetJumpHeight();
     freeMovement    = ggm.GetFreeMovement();
     lowJumpMult     = ggm.GetLowJumpMult();
     fallMult        = ggm.GetFallMult();
     anim            = this.transform.GetChild(0).GetComponent <Animator>();
     Physics.gravity = new Vector3(0.0f, ggm.GetGravity(), 0.0f);
     // May need to turn into switch
     if (!freeMovement)
     {
         playerRB.constraints = RigidbodyConstraints.FreezePositionX;
     }
     // Part of PopulateSkins, have to turn off and turn on to reset the animator controller with the skins.
     wizardModel.SetActive(true);
 }