Пример #1
0
        public static void Notify(object sender, GameEventArgs e)
        {
            switch (e.type)
            {
            case SIGNED_IN:
                SingedIn?.Invoke(sender, e);
                break;

            case FAIL_SIGN_IN:
                FailSignIn?.Invoke(sender, e);
                break;

            case SIGNED_OUT:
                SignedOut?.Invoke(sender, e);
                break;

            case DATA_LOADED:
                DataLoaded?.Invoke(sender, e);
                break;

            case FAIL_DATA_LOADING:
                FailDataLoading?.Invoke(sender, e);
                break;
            }
        }
Пример #2
0
        /// <summary>
        /// Use it for notify from EventTrigger Component. Requires to be component on GameObject!
        /// </summary>
        /// <param name="sender">The sender object.</param>
        /// <param name="e">Event arguments</param>
        public void Notify(string type)
        {
            switch (type)
            {
            case SIGNED_IN:
                SingedIn?.Invoke(null, new GameEventArgs(type));
                break;

            case FAIL_SIGN_IN:
                FailSignIn?.Invoke(null, new GameEventArgs(type));
                break;

            case SIGNED_OUT:
                SignedOut?.Invoke(null, new GameEventArgs(type));
                break;

            case DATA_LOADED:
                DataLoaded?.Invoke(null, new GameEventArgs(type));
                break;

            case FAIL_DATA_LOADING:
                FailDataLoading?.Invoke(null, new GameEventArgs(type));
                break;
            }
        }