// Use this for initialization void Start() { avatarMapper = gameObject.GetComponent <AvatarMapper>(); if (!avatarMapper) { avatarMapper = gameObject.AddComponent <AvatarMapper>(); } socketScript = gameObject.GetComponent <SocketScript>(); if (!socketScript) { socketScript = gameObject.AddComponent <SocketScript>(); } //Application.LoadLevel("Demo"); //Application.LoadLevel (0); }
// Use this for initialization void Start() { ballPosition = transform.position; ballRotation = transform.rotation; ballRidgidBody = gameObject.GetComponent <Rigidbody>(); socketScript = gameObject.GetComponent <SocketScript>(); if (!socketScript) { socketScript = gameObject.AddComponent <SocketScript>(); } avatarMapper = gameObject.GetComponent <AvatarMapper>(); if (!avatarMapper) { avatarMapper = gameObject.AddComponent <AvatarMapper>(); } grab = false; }