void Start() { inputvector = Vector2.zero; dead = false; facing = 1; rb = GetComponent <Rigidbody>(); //shieldrb = shield.GetComponent<Rigidbody>(); //shieldpos = shieldrb.position - rb.position; //swordpos = sword.transform.localPosition; //swordangle = sword.transform.localRotation; //swordbox = sword.GetComponent<BoxCollider>(); //swordbox.enabled = false; //swordrb = sword.GetComponent<Rigidbody>(); //bodyrend = GetComponent<LineRenderer>(); //bodyverts = new Vector3[bodyrend.positionCount]; //bodyrend.GetPositions(bodyverts); //facing = Vector3.right; transform.parent = null; nocontrol = false; //transform.position += Vector3.up;// * 0.5f; //statCanvas = statCanvasObj.GetComponent<PlayerStatCanvas>(); limbScript = GetComponent <SwordAndShieldUser>(); limbScript.SetSpeed(maxspeed); limbScript.SetSpeedFraction(0f); //limbScript.facing = -1; }
// Use this for initialization public override void Start() { base.Start(); stabtime = Random.Range(0, maxStabInterval); limbScript = GetComponent <SwordAndShieldUser>(); limbScript.SetSpeed(speed); limbScript.SetSpeedFraction(0f); facing = 1; }