コード例 #1
0
ファイル: ProxyBasic.cs プロジェクト: EmilyEdna/XExten
        /// <summary>
        /// 初始化通信中心Socket
        /// </summary>
        /// <param name="Action"></param>
        /// <param name="UseServer"></param>
        public static void InitInternalSocket(Action <ProxyBasic> Action, bool UseServer = false)
        {
            ProxyBasic Client = new ProxyBasic();

            Action(Client);
            SocketConstConfig.ClientPort = Client.ClientPort;
            if (UseServer)
            {
                CallEvent.Instance().Changed += new CallEvent.ResultEventHandler(CallEventAction.Instance().OnResponse);
                Client.InitInternalSocket(Client.SockInfoIP, Client.SockInfoPort, DependencyExecute.Instance.FindLibrary());
            }
        }
コード例 #2
0
ファイル: ProxyBasic.cs プロジェクト: EmilyEdna/XExten
        /// <summary>
        /// 重新连接通信中心
        /// </summary>
        /// <param name="Action"></param>
        public static void ReOpenInternalSocket(Action <ProxyBasic> Action)
        {
            ProxyBasic Client = new ProxyBasic();

            Action(Client);
            if (Call.SocketClient.IsConnected)
            {
                Call.SocketClient.DisConnect();
            }
            CallEvent.Instance().Changed += new CallEvent.ResultEventHandler(CallEventAction.Instance().OnResponse);
            Client.InitInternalSocket(Client.SockInfoIP, Client.SockInfoPort, DependencyExecute.Instance.FindLibrary());
        }
コード例 #3
0
    public BaseAction GetAction()
    {
        if (actionType == ActionType.Move)
        {
            return(MoveAction.Create(v31.VarianceXY(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.HorizontalMove)
        {
            return(HMoveAction.Create(f1.Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.VerticalMove)
        {
            return(VMoveAction.Create(f1.Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Scale)
        {
            return(ScaleAction.Create(v31.VarianceXY(variance), b1, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Rotate)
        {
            return(RotateAction.Create(f1.Variance(variance), b1, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Fade)
        {
            return(FadeAction.Create(f1.Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Tint)
        {
            return(TintAction.Create(c1.RGB().Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.SetPosition)
        {
            return(SetPositionAction.Create(v31, v32, b1, b2));
        }

        if (actionType == ActionType.SetScale)
        {
            return(SetScaleAction.Create(v31, v32, b1));
        }

        if (actionType == ActionType.SetRotation)
        {
            return(SetRotationAction.Create(f1, f2));
        }

        if (actionType == ActionType.SetAlpha)
        {
            return(SetAlphaAction.Create(f1, f2, b1));
        }

        if (actionType == ActionType.SetRGB)
        {
            return(SetRGBAction.Create(c1.RGB(), c2.RGB(), b1));
        }

        if (actionType == ActionType.Delay)
        {
            return(DelayAction.Create(duration, f2));
        }

        if (actionType == ActionType.AnimatorTrigger)
        {
            return(AnimatorTriggerAction.Create(s1));
        }

        if (actionType == ActionType.PlaySound)
        {
            return(PlaySoundAction.Create(soundId, soundType, f1));
        }

        if (actionType == ActionType.CallEvent)
        {
            return(CallEventAction.Create(e1));
        }

        if (actionType == ActionType.PlayParticleSystem)
        {
            return(PlayPSAction.Create(b1));
        }

        return(null);
    }