Ejemplo n.º 1
0
    public static void OnComplete(GameObject obj)
    {
        SceneItemAgent agent  = obj.GetComponent <SceneItemAgent>();
        CFX_AutoRotate rotate = obj.GetComponent <CFX_AutoRotate>();

        GameObject.Destroy(rotate);

        obj.transform.rotation = Quaternion.Euler(0, obj.transform.eulerAngles.y, 0);
        if (agent != null)
        {
            agent.OnStart();
            //agent.SetAsDrop();
            if (agent.ItemInfo != null && agent.ItemInfo.IsFlag())
            {
                agent.SetAutoDestroy(3.0f);//镖物归位
            }
        }
        else
        {
            PickupItemAgent a = obj.GetComponent <PickupItemAgent>();
            if (a != null)
            {
                a.OnStart();
            }
        }
    }