Ejemplo n.º 1
0
 private void Start()
 {
     prevPosition = transform.position;
     if (attachedTo != -1)
     {
         attPos = this.transform.localPosition;
     }
     anim.a      = gameObject.GetComponent <Animator>();
     destination = gameObject.transform.position;
     thisHealth  = this.gameObject.GetComponent <Health>();
     move.SetThisObject(gameObject.GetComponent <Rigidbody2D>());
     flip.SetThisObject(gameObject.GetComponent <Rigidbody2D>());
     flip.facingRight = false;
     jump.SetThisObject(thisObject);
     climb.SetThisObject(thisObject);
     land            = new BasicLand(thisObject, jump, climb);
     jump.jumpSpeedY = jumpHeight;
 }
Ejemplo n.º 2
0
 // Use this for initialization
 private void Start()
 {
     turnAngleLeft  = Hip.transform.localEulerAngles.z + Back.transform.localEulerAngles.z + leftArm.transform.localEulerAngles.z + leftHand.transform.localEulerAngles.z;
     turnAngleRight = Hip.transform.localEulerAngles.z + Back.transform.localEulerAngles.z + rightArm.transform.localEulerAngles.z + rightHand.transform.localEulerAngles.z;
     thisObject     = gameObject.GetComponent <Rigidbody2D>();
     thisHealth     = thisObject.GetComponent <Health>();
     anim.a         = GetComponent <Animator>();
     move.SetThisObject(thisObject);
     flip.SetThisObject(thisObject);
     jump.SetThisObject(thisObject);
     land  = new BasicLand(thisObject, jump, climb);
     ledge = new BasicLand(thisObject, jump, climb, 100000, false, true);
     wall  = new BasicLand(thisObject, jump, climb, 0, false);
     step  = new BasicLand(thisObject, jump, climb, 0, false);
     climb.SetThisObject(thisObject);
     inventory.Start();
     spellInventory.Start();
     munitions.maxAmount = 11;
     munitions.Start();
     pickableItem = new List <GameObject>();
     SetDefaultBoneAngles();
     RecalcCharacteristics();
     //ShowHideMenu();
 }