예제 #1
0
    private void Update()
    {
        if (obj != gameObject.GetComponent <Hand>().currentAttachedObject)
        {
            obj = gameObject.GetComponent <Hand>().currentAttachedObject;

            if (obj != null)
            {
                timedDestroy = obj.GetComponent <timedObjectDestroyer>();

                if (timedDestroy != null)
                {
                    if (timedDestroy.isDying())
                    {
                        timedDestroy.SaveMe();
                    }
                }
            }
        }
    }