예제 #1
0
    protected override void ExtractTriggers()
    {
        PlayerAgent playerComponent     = null;
        GameObject  correspondingObject = null;
        int         triggers            = 0;

        triggerComponents = triggerSourceComponent.GetAllPlayerComponents();
        if (triggerComponents != null)
        {
            triggers = triggerComponents.Length;
            if (triggers > 0)
            {
                triggerObjects = new GameObject[triggers];
                for (int i = 0; i < triggers; i++)
                {
                    correspondingObject = null;
                    playerComponent     = triggerComponents[i];
                    if (playerComponent != null)
                    {
                        correspondingObject = playerComponent.gameObject;
                    }
                    triggerObjects[i] = correspondingObject;
                }
            }
            else
            {
                triggerComponents = null;
            }
        }
    }