// Use this for initialization void Start () { Debug.Log ("Hello"); initialMousePos = Input.mousePosition; gripBar = Object.FindObjectOfType<GripBar> (); handSprite = GetComponentInChildren<SpriteRenderer> (); opponent = Object.FindObjectOfType<OpponentControl> (); handSprite.sprite = openImage; oppSprite = GetComponentInChildren<SpriteRenderer> (); oppSprite.sprite = openImage; handGood01 = GameObject.Find ("HandGood01").GetComponent<AudioSource> (); handGood02 = GameObject.Find ("HandGood02").GetComponent<AudioSource> (); handBad = GameObject.Find ("HandBad").GetComponent<AudioSource> (); }
void Awake() { // Find the objects in the scene player = Object.FindObjectOfType<PlayerControl> (); opponent = Object.FindObjectOfType<OpponentControl> (); shakezone = Object.FindObjectOfType<ShakeZone> (); winSound = GameObject.Find ("WinEffect").GetComponent<AudioSource>(); loseSound = GameObject.Find ("LoseEffect").GetComponent<AudioSource>(); successPanel = FindObjectOfType<SuccessPanel> (); // Determine which level this is }