Example #1
0
    // Use this for initialization
    void Start()
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (player != null)
        {
            playerHold = player.GetComponent <GrabAndThrowPieces> ();
        }
        else if (player == null)
        {
            Debug.Log("Cannot find grab and throw pieces component from player");
        }
    }
 // Use this for initialization
 void Start()
 {
     nilanHoldingPiece = GetComponent <GrabAndThrowPieces>();
 }