Example #1
0
        public override void Refresh(Paramter paramter)
        {
            Reward reward = paramter.Get <Reward>("reward");

            title.text = reward.title;

            SetActive(true);

            coroutine = StartCoroutine(Refresh(reward));
        }
Example #2
0
        public void Paramter(UIPanel key, Paramter paramter)
        {
            if (_panels.ContainsKey(key))
            {
                _panels[key].Paramter(paramter);
            }
            else
            {
                _panels.Add(key, new CtrlBase());

                _panels[key].Paramter(paramter);
            }
        }
Example #3
0
        public override void Refresh(Paramter paramter)
        {
            if (paramter == null)
            {
                return;
            }

            message.Add(paramter.Get <string>("message"));

            if (status == NoticeStatus.None)
            {
                status = NoticeStatus.Compute;
            }
        }
Example #4
0
        public override void Refresh(Paramter paramter)
        {
            status = Status.Idle;

            notice.text = paramter.Get <string>("notice");

            timer = 0;

            content.anchoredPosition = Vector2.zero;

            canvas.alpha = step = 0;

            status = Status.Update;
        }
Example #5
0
        /// <summary>
        /// 得到表达式
        /// </summary>
        /// <returns></returns>
        public virtual string GetPattern()
        {
            if (Rule == null)
            {
                return(null);
            }
            if (string.IsNullOrEmpty(Paramter))
            {
                return(Rule.Pattern);
            }
            var arr     = Paramter.Replace("\r", "").Split('\n');
            var pattern = Rule.Pattern;

            for (int i = 0; i < arr.Length; i++)
            {
                pattern = pattern.Replace(string.Format("P{0}", i), arr[i]);
            }
            return(pattern);
        }
Example #6
0
        public override void Refresh(Paramter paramter)
        {
            if (paramter == null)
            {
                return;
            }

            confirm = paramter.Get <Action>("confirm");

            cancel = paramter.Get <Action>("cancel");

            txt_title.text = paramter.Get <string>("title");

            txt_message.text = paramter.Get <string>("message");

            float height = 320f;

            height += txt_message.preferredHeight;

            content.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, height);
        }
Example #7
0
 public void Paramter(Paramter paramter)
 {
     this.paramter = paramter;
 }
 void ProcessCommandToSystem(string Command, string[] CallParameter,Paramter[] Triggerparameter)
 {
 }
    //Use Original FuctionNames
    void ProcessCommandToObject(RPGObject target,string Command ,string[] CallParameter, Paramter[] Triggerparameter)
    {
        List<NumericValue> numericOutput = new List<NumericValue> ();
        List<StringValue> stringOutput = new List<StringValue> ();

        switch (Command) {
        case "recievedamage":
            numericOutput.Add(new NumericValue("output0",target.recieveDamage(collectNumericValue(CallParameter[0],Triggerparameter),collectStringValue(CallParameter[1]),collectIRPGSource(CallParameter[2],Triggerparameter))));
            break;
        case "updatestatistics":
            target.updateStatistics();
            break;
        case "addeffect":
            if(CallParameter.Length==1)
            target.addEffect(collectIRPGSource(CallParameter[0])as TEffect,this.source);
            else
                target.addEffect(RPGCore.instance.spawnEffect(CallParameter[0]),this.source);
            break;
        }

        nValues.RemoveAll(delegate(NumericValue obj) {
            return obj.Name.Contains("output");
        });
        sValues.RemoveAll(delegate(StringValue obj) {
            return obj.Name.Contains("output");
        });
        nValues.AddRange (numericOutput);
        sValues.AddRange (stringOutput);
    }
 void ProcessCommandToEffect(TEffect target,string Command, string[] CallParameter, Paramter[] Triggerparameter)
 {
 }
 public void OnTakeDamage(ref float value, string Type,IRPGSource source)
 {
     if (!Effect.IsSupressed && TakeDamage) {
         NumericValue v=new NumericValue("value",value);
         nValues.Add(v);
         StringValue t=new StringValue("type",Type);
         sValues.Add(t);
         Paramter s=new Paramter("source",source);
         ExecuteScript(new Paramter[]{s});
         nValues.Remove(v);
         sValues.Remove(t);
         value=v.Value;
     }
 }
 public void OnRecieveHealing(ref float value,IRPGSource source)
 {
     if (!Effect.IsSupressed && RecieveHealing) {
         NumericValue v=new NumericValue("value",value);
         nValues.Add(v);
         Paramter s=new Paramter("source",source);
         ExecuteScript(new Paramter[]{s});
         nValues.Remove(v);
         value=v.Value;
     }
 }
Example #13
0
 public override void Refresh(Paramter paramter)
 {
     content.text = paramter.Get <string>("tips");
 }
Example #14
0
 public virtual void Refresh(Paramter paramter)
 {
 }
Example #15
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Paramter"></param>
        /// <param name="GameType">重庆,新疆,五分,VR,滕五,腾十,澳彩</param>
        /// <param name="PicType">文本,龙虎,独龙虎,牛牛,图1(jpg)</param>
        public static WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType ShiShiCaiPicTypeCaculate(string NewParamter, ref string GameType, ref string PicType, ref string SettingUserName)
        {
            string Paramter = "";

            if (NewParamter.Contains("群"))
            {
                SettingUserName = NewParamter.Substring(0, NewParamter.LastIndexOf("群"));
                Paramter        = NewParamter.Substring(NewParamter.LastIndexOf("群") + 1);
            }
            else
            {
                SettingUserName = "";
                Paramter        = NewParamter;
            }
            GameType = "";
            PicType  = "";


            string first2 = (Paramter.Length > 2 ? Paramter.Substring(0, 2) : Paramter);
            string first3 = (Paramter.Length > 3 ? Paramter.Substring(0, 3) : Paramter);

            first2 = first2.ToUpper();
            first3 = first3.ToUpper();
            switch (first2)
            {
            case "重庆":
                GameType = first2;
                break;

            case "新疆":
                GameType = first2;
                break;

            case "五分":
                GameType = first2;
                break;

            case "VR":
                GameType = first2;
                break;

            case "腾五":
                if (first3 == "腾五信")
                {
                    GameType = "腾五信";
                }
                else
                {
                    GameType = first2;
                }
                break;

            case "腾十":
                if (first3 == "腾十信")
                {
                    GameType = "腾十信";
                }
                else
                {
                    GameType = first2;
                }

                break;

            case "澳彩":
                GameType = first2;
                break;

            case "河五":
                GameType = first2;
                break;

            default:
                GameType = "";
                break;
            }
            string End2        = Paramter.Length > (GameType.Length + 2) ? Paramter.Substring((GameType.Length), 2) : Paramter.Substring(GameType.Length);
            Int32  StartPrefix = 0;

            switch (End2)
            {
            case "":
                PicType     = "";
                StartPrefix = GameType.Length;
                break;

            case "文本":
                PicType     = "文本";
                StartPrefix = GameType.Length + 2;
                break;

            case "龙虎":
                PicType     = "龙虎";
                StartPrefix = GameType.Length + 2;
                break;

            case "独龙":
                PicType     = "独龙虎";
                StartPrefix = GameType.Length + 3;
                break;

            case "牛牛":
                PicType     = "牛牛";
                StartPrefix = GameType.Length + 2;
                break;

            case "图1":
                PicType     = "图1";
                StartPrefix = GameType.Length + 2;
                break;

            default:
                PicType     = "";
                StartPrefix = GameType.Length;
                break;
            }

            string Operation = Paramter.Substring(StartPrefix);

            if (Operation == ("发图"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Keep);
            }
            else if (Operation == ("1"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Keep);
            }
            else if (Operation == ("停图"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Stop);
            }
            else if (Operation == ("3"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Stop);
            }
            else if (Operation == ("补图"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Once);
            }
            else if (Operation == ("2"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Once);
            }
            else if (Operation == ("停止"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.RestoreDefault);
            }
            else if (Operation == ("4"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.RestoreDefault);
            }
            else if (Operation == (""))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Once);
            }
            else if (Operation == ("图"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.Once);
            }
            if (Operation.StartsWith("发图"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.SetTime);
            }
            if (Operation.StartsWith("发图"))
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.SetTime);
            }
            else
            {
                return(WeixinRobotLib.Entity.Linq.ProgramLogic.ShiShiCaiPicKeepType.UnKnown);
            }
        }
Example #16
0
 public override void Refresh(Paramter paramter)
 {
     Refresh(null);
 }