Beispiel #1
0
    void Start()
    {
        EZScreenPlacement ScreenPlacement = gameObject.GetComponent <EZScreenPlacement>();

        if (ScreenPlacement != null)
        {
            ScreenPlacement.SetCamera(UISystem.Instance.UiCamrea);
        }

        CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_NEW_ITEM, OnEvent);
        //CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_PACKAGE_ITEM_CHANGED, OnEvent);
        CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_UNIT_HP, OnEvent);

        actionButton.AddInputDelegate(OnActionButtonClicked);

        gameObject.SetActiveRecursively(false);
    }