Exemplo n.º 1
0
    public void Drop()
    {
        dragging = false;

        if (currentProspect != null)
        {
            CitizenBehavior citizen = currentProspect.GetComponent <CitizenBehavior>();
            citizen.FeedCaterpillar();

            GameObject.Find("CreatureManager").GetComponent <CreatureManager_Script>().DestroyCaterpillar(gameObject);
            //GameObject.Instantiate (caterpillarPrefab, new Vector3(0f, -.2f, 0f), Quaternion.identity);


            //Destroy (this.gameObject);
        }
        else
        {
            transform.position = oldLoc;
        }
    }