public SearchComponent(string fieldName, SM searchMode, object value, CM conditionMode)
 {
     this._fieldName = fieldName;
       this._searchmode = searchMode;
       this._value = value;
       this._conditionMode = conditionMode;
 }
Exemple #2
0
        // v7.x legacy overload
        public void UPS2GetRates(Shipments AllShipments, out string RTShipRequest, out string RTShipResponse, decimal ExtraFee, Decimal MarkupPercent, decimal ShipmentValue, decimal ShippingTaxRate)
        {
            RTShipRequest  = String.Empty;
            RTShipResponse = String.Empty;

            ups2.ShippingSection ShippingConfig = new ups2.ShippingSection();
            ShippingConfig.CallForShippingPrompt = AppLogic.AppConfig("RTShipping.CallForShippingPrompt");
            ShippingConfig.Currency = AppLogic.AppConfig("Localization.StoreCurrency");
            ShippingConfig.ExtraFee = AppLogic.AppConfigUSDecimal("ShippingHandlingExtraFee");
            ShippingConfig.FilterOutShippingMethodsThatHave0Cost = AppLogic.AppConfigBool("FilterOutShippingMethodsThatHave0Cost");
            ShippingConfig.MarkupPercent  = AppLogic.AppConfigUSDecimal("RTShipping.MarkupPercent");
            ShippingConfig.OriginAddress  = AppLogic.AppConfig("RTShipping.OriginAddress");
            ShippingConfig.OriginAddress2 = AppLogic.AppConfig("RTShipping.OriginAddress2");
            ShippingConfig.OriginCity     = AppLogic.AppConfig("RTShipping.OriginCity");
            ShippingConfig.OriginCountry  = AppLogic.AppConfig("RTShipping.OriginCountry");
            ShippingConfig.OriginState    = AppLogic.AppConfig("RTShipping.OriginState");
            ShippingConfig.OriginZip      = AppLogic.AppConfig("RTShipping.OriginZip");
            ShippingConfig.UseTestRates   = AppLogic.AppConfigBool("RTShipping.UseTestRates");
            ShippingConfig.WeightUnits    = AppLogic.AppConfig("Localization.WeightUnits");

            ups2.UPSSection UPSConfig = new ups2.UPSSection();
            UPSConfig.AccountNumber          = AppLogic.AppConfig("RTShipping.UPS.AccountNumber");
            UPSConfig.AddressTypeBehavior    = AppLogic.AppConfig("RTShipping.UPS.AddressTypeBehavior");
            UPSConfig.CustomerClassification = AppLogic.AppConfig("RTShipping.UPS.CustomerClassification");
            if (!AllShipments.IsInternational)
            {
                UPSConfig.DeliveryConfirmation = AppLogic.AppConfig("RTShipping.UPS.DeliveryConfirmation");
            }
            UPSConfig.GetNegotiatedRates = AppLogic.AppConfigBool("RTShipping.UPS.GetNegotiatedRates");
            UPSConfig.License            = AppLogic.AppConfig("RTShipping.UPS.License");
            UPSConfig.MaxWeight          = AppLogic.AppConfigUSDecimal("RTShipping.UPS.MaxWeight");
            UPSConfig.PackagingType      = AppLogic.AppConfig("RTShipping.UPS.PackagingType");
            UPSConfig.Password           = AppLogic.AppConfig("RTShipping.UPS.Password");
            UPSConfig.PickupType         = AppLogic.AppConfig("RTShipping.UPS.UPSPickupType");
            UPSConfig.Server             = AppLogic.AppConfig("RTShipping.UPS.Server");
            UPSConfig.Services           = AppLogic.AppConfig("RTShipping.UPS.Services");
            UPSConfig.TestServer         = AppLogic.AppConfig("RTShipping.UPS.TestServer");
            UPSConfig.UserName           = AppLogic.AppConfig("RTShipping.UPS.Username");

            ShippingMethods UPS2Methods = UPS2Rates.GetRates(AllShipments, ShipmentWeight, ShipmentValue, ShippingTaxRate,
                                                             out RTShipRequest, out RTShipResponse, ref ShippingConfig, ref UPSConfig);

            foreach (ShipMethod UPS2Method in UPS2Methods)
            {
                SM.AddMethod(UPS2Method);
            }
            SM.ErrorMsg = UPS2Methods.ErrorMsg;
        }
Exemple #3
0
        public void  表联表分页测试()
        {
            var arruser = new int[2] {
                1, 2
            };                                 //
            string   uall = "b.*", pn1 = "%蛋蛋%", pn2 = "%m%";
            LockPers lpmodel = new LockPers()
            {
                IsDel = false
            };
            Users umodel = new Users()
            {
                UserName = "******"
            };
            SynNote snmodel = new SynNote()
            {
                Name = "木头"
            };

            Expression <Func <LockPers, Users, SynNote, bool> > where = PredicateBuilder.WhereStart <LockPers, Users, SynNote>();
            where = where.And((l, u, s) => (l.Name.Contains(pn1) || l.Name.Contains(pn2)));
            where = where.And((lpw, uw, sn) => lpw.IsDel == lpmodel.IsDel);
            where = where.And((l, u, s) => u.UserName == umodel.UserName);
            where = where.And((l, u, s) => s.Name == snmodel.Name);
            where = where.And((l, u, s) => SM.In(u.Id, arruser));

            DapperSqlMaker <LockPers, Users, SynNote> query = LockDapperUtilsqlite <LockPers, Users, SynNote>
                                                              .Selec()
                                                              .Column((lp, u, s) => //null)  //查询所有字段
                                                                      new { lp.Name, lpid = lp.Id, x = "LENGTH(a.Prompt) as len", b = SM.Sql(uall), scontent = s.Content, sname = s.Name })
                                                              .FromJoin(JoinType.Left, (lpp, uu, snn) => uu.Id == lpp.UserId
                                                                        , JoinType.Inner, (lpp, uu, snn) => uu.Id == snn.UserId)
                                                              .Where(where)
                                                              .Order((lp, w, sn) => new { lp.EditCount, x = SM.OrderDesc(lp.Name), sn.Content });

            var result = query.ExcuteSelect();

            WriteJson(result); //  查询结果

            Tuple <StringBuilder, DynamicParameters> resultsqlparams = query.RawSqlParams();

            WriteSqlParams(resultsqlparams); // 打印sql和参数

            int page = 2, rows = 3, records;
            var result2 = query.LoadPagelt(page, rows, out records);

            WriteJson(result2); //  查询结果
        }
Exemple #4
0
        public void UpdateCameraState(bool isOn, bool globalDeactivation = false)
        {
            DisplayCam.gameObject.SetActive(isOn);
            DisplayCam.enabled = isOn;
            RenderTargetCam.gameObject.SetActive(isOn);
            RenderTargetCam.enabled = isOn;

            if (LEDRenderer != null)
            {
                LEDRenderer.material.SetColor("_Color", isOn ? LEDColorOn : LEDColorOff);
                LEDRenderer.material.SetColor("_EmissionColor", isOn ? LEDEmissOn : LEDEmissOff);
            }
            if (Screen != null)
            {
                Material[] materials = Screen.gameObject.GetComponent <Renderer>().materials;
                if (materials.Length > 1)
                {
                    materials[1] = isOn ? ScreenOn : ScreenOff;
                }
                Screen.gameObject.GetComponent <Renderer>().materials = materials;
            }

            foreach (SpectatorCamera cam in FindObjectsOfType <SpectatorCamera>())
            {
                if (cam != this && cam.CameraOn)
                {
                    cam.UpdateCameraState(false);
                }
            }
            foreach (SpectatorCameraAttachmentInterface cam in FindObjectsOfType <SpectatorCameraAttachmentInterface>())
            {
                if (cam != this && cam.CameraOn)
                {
                    cam.UpdateCameraState(false);
                }
            }

            if (isOn && CamOn.Clips.Count > 0)
            {
                SM.PlayCoreSound(FVRPooledAudioType.UIChirp, CamOn, this.transform.position);
            }
            else if (CamOff.Clips.Count > 0)
            {
                SM.PlayCoreSound(FVRPooledAudioType.UIChirp, CamOff, this.transform.position);
            }

            CameraOn = isOn;
        }
Exemple #5
0
        // GET: Tutor/SecretMessages/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SM sM = db.SMS.Find(id);

            if (sM == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Receiver = new SelectList(db.BTTUsers, "ID", "FirstName", sM.Receiver);
            ViewBag.Sender   = new SelectList(db.BTTUsers, "ID", "FirstName", sM.Sender);
            return(View(sM));
        }
Exemple #6
0
  private void OnLineClick(InventoryItem item)
  {
    Debug.LogFormat("On line click:{0}", item.name);

    if (item.kind == InventoryItemKind.HealthPotion)
    {
      if (SM.Hp >= 1)
        return;

      SM.FillHp();
      Inventory.Remove(item.name);
      return;
    }


  }
 private void Export_Click(object sender, RoutedEventArgs e)
 {
     if (SM != null)
     {
         SaveFileDialog SFD = new SaveFileDialog();
         SFD.Filter = "Setting files (*.ini)|*.ini";
         SFD.Title  = "Export settings";
         if (SFD.ShowDialog() == true)
         {
             if (!SM.Save(SFD.FileName))
             {
                 MessageBox.Show("Export was unsuccessful.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
     }
 }
 private void Import_Click(object sender, RoutedEventArgs e)
 {
     if (SM != null)
     {
         OpenFileDialog OFD = new OpenFileDialog();
         OFD.Filter = "Setting files (*.ini)|*.ini";
         OFD.Title  = "Import settings";
         if (OFD.ShowDialog() == true)
         {
             if (!SM.Load(OFD.FileName))
             {
                 MessageBox.Show("Import was unsuccessful.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
             }
         }
     }
 }
Exemple #9
0
 public void Defend()
 {
     Debug.Log("!!");
     foreach (Soldier off in targets)
     {
         Soldier[] subs = SM.AsOfficer(off).subs;
         off.DefendNow(3f);
         foreach (Soldier sold in subs)
         {
             if (sold != null)
             {
                 sold.DefendNow(SM.AsPrivate(sold).PrivPos(), 3f);
             }
         }
     }
 }
Exemple #10
0
    private static void ClearTargets()
    {
        foreach (Soldier officer in targets)
        {
            Soldier[] subs = SM.AsOfficer(officer).subs;

            officer.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Soldier/S_Base_Officer_" + yourArmy);
            foreach (Soldier sold in subs)
            {
                if (sold != null)
                {
                    sold.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Soldier/S_Base_" + yourArmy);
                }
            }
        }
        targets.Clear();
    }
Exemple #11
0
    void Start()
    {
        string name = transform.parent.name;

        if (name == "Soldier")
        {
            if (SM.IsOfficer(transform.parent.GetComponent <Soldier>()))
            {
                name = "Officer";
            }
            if (SM.IsWarlord(transform.parent.GetComponent <Soldier>()))
            {
                name = "Warlord";
            }
        }
        transform.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Shadows/Sh_" + name);
    }
Exemple #12
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (coolDownHp > 0)
        {
            return;
        }

        Enemy enemy = collision.GetComponentInParent <Enemy>();

        if (!enemy)
        {
            return;
        }

        SM.SetHp(enemy.attackDamage / 100f);
        coolDownHp = 1;
    }
        public void 更新部分字段_含子查询_测试lt()
        {
            var model = new Users()
            {
                CreateTime = DateTime.Now
            };
            string colm = "img", val = "(select value from skin limit 1 offset 1)"; DateTime cdate = DateTime.Now;
            var    update = DBSqlite <Users> .Update().EditColumn(p => new bool[] {
                p.UserName == "几十行代码几十个错 调一步改一步....", p.Password == "bug制造者"
                , p.CreateTime == model.CreateTime, SM.Sql(p.Remark, "(select '奥德赛 终于改好了')")
            }).Where(p => p.Id == 6 && SM.SQL("IsDel == 0"));

            Console.WriteLine(update.RawSqlParams().Item1);
            var efrow = update.ExecuteUpdate();

            Console.WriteLine(efrow);
        }
 private void OnInteract()
 {
     //CurrentState is protected, use reflection to change it
     _state.SetValue(SM, SceneManager.State.Transitioning);
     SM.SetupState.PrepareForExitState();
     LoadingOverlay.Instance.Enable();
     SM.FadeOut(SM.SetupState.FadeOutTime, delegate
     {
         SM.SaveData();
         SM.SetupState.ExitState();
         _state.SetValue(SceneManager.Instance, SceneManager.State.ModManager);
         LoadingOverlay.Instance.Disable();
         //UnityEngine.SceneManagement.Scene ManualManager = SceneManagement.CreateScene("ManualManagerScene");
         //SceneManagement.SetActiveScene(ManualManager);
         button = true;
     });
 }
Exemple #15
0
        private void ConfigureSM()
        {
            SM.Configure(PolicyState.PolicyReady)
            .Permit(PolicyTrigger.BrokerSubmitsGroupApplication, PolicyState.InUnderwriting);

            SM.Configure(PolicyState.InUnderwriting)
            .Permit(PolicyTrigger.PlanRejectsPolicy, PolicyState.Failed)
            .PermitReentry(PolicyTrigger.BrokerAmmendsGroupApplication)
            .Permit(PolicyTrigger.PlanApprovesPolicy, PolicyState.PolicyApproved);

            SM.Configure(PolicyState.PolicyApproved)
            .Permit(PolicyTrigger.GroupRejectsPolicy, PolicyState.Failed)
            .Permit(PolicyTrigger.GroupApprovesPolicy, PolicyState.Complete);

            SM.Configure(PolicyState.Complete)
            .Permit(PolicyTrigger.PlanSetsUpGroup, PolicyState.EnrollmentInProgress);
        }
Exemple #16
0
    private void OnTriggerStay2D(Collider2D col)
    {
        zEnd = -(transform.position.z + transform.GetComponent <Collider2D>().offset.y *(float)System.Math.Cos(Vector3.Angle(transform.up, Vector3.forward) * System.Math.PI / 180f));
        if (zEnd <= minHeight && col.gameObject.layer == SM.SoldierLayer && SM.GetArmy(col.transform) != army && dmgK > 0f)
        {
            float basicDmg   = (float)(SM._rnd.NextDouble()) * (maxBasicDmg - minBasicDmg) + minBasicDmg;
            bool  isCritical = SM._rnd.NextDouble() <= critPoss;
            basicDmg = isCritical ? basicDmg * critMult : basicDmg;
            float dmg = basicDmg * dmgDecK * dmgK * dKbyClass;
            if (SM.IsWarlord(col.transform.GetComponent <Soldier>()))
            {
                dmg = 9f;
            }

            foreach (WEffect eff in effects)
            {
                eff(col.transform, (col.transform.position - transform.position).normalized, dmg);
            }

            col.transform.GetComponent <Soldier>().TakeDamage(dmg);
            //Debug.Log(army + ": " + dmg + ((isCritical || dmgDecK < 1f) ? " (" : "") + (isCritical ? "  critical: x" + critMult : "") + (dmgDecK < 1f ? "  blocked: x" + dmgDecK : "") + ((isCritical || dmgDecK < 1f) ? "  )" : "") + ".");

            speed = Vector3.zero;
            //if(zEnd>=minHeight)
            //    transform.GetComponent<SpriteRenderer>().sprite = Resources.Load<Sprite>("Soldier/" + transform.GetComponent<SpriteRenderer>().sprite.name + "_In");
            transform.parent   = col.transform;
            transform.position = transform.position + Vector3.forward * (col.transform.position.z + zEnd);
            transform.GetComponent <SpriteRenderer>().sortingLayerName            = "Default";
            transform.GetComponent <SpriteRenderer>().sortingOrder                = 1;
            transform.Find("Shadow").GetComponent <SpriteRenderer>().sortingOrder = 0;
            transform.GetComponent <Collider2D>().enabled        = false;
            transform.GetComponent <Projectile_Weapon>().enabled = false;
        }
        else if (col.gameObject.layer == SM.ProtectionLayer && SM.GetArmy(col.transform) != army && zEnd <= col.transform.GetComponent <Defence>().height)
        {
            dmgDecK            = col.transform.GetComponent <Defence>().dmgDecK;
            speed              = Vector3.zero;
            transform.parent   = col.transform;
            transform.position = transform.position + Vector3.forward * (col.transform.position.z + zEnd);
            transform.GetComponent <SpriteRenderer>().sortingLayerName            = "Default";
            transform.GetComponent <SpriteRenderer>().sortingOrder                = 1;
            transform.Find("Shadow").GetComponent <SpriteRenderer>().sortingOrder = 0;
            transform.GetComponent <Collider2D>().enabled        = false;
            transform.GetComponent <Projectile_Weapon>().enabled = false;
        }
    }
Exemple #17
0
        // Run all the models stream and sub
        public void RunModels()
        {
            // run the stream model
            FStreamModel.RunModel();
            // get the stream allocation for all regions
            int[] ModelAllocation = FStreamModel.RegionAllocation();
            int   index           = 0;

            foreach (Submodel SM in FSubModelList)
            {
                // Sets each modesl allocation
                SM.Set_Allocation(ModelAllocation[index]);
                index++;
                // now run the submodels
                SM.RunSubModel();
            }
        }
Exemple #18
0
        /// <summary>
        /// Adds a student leave type instance of Database from the client Data.
        /// </summary>
        /// <param name="smsInput">The input data from the client side.</param>
        /// <returns></returns>
        public int addSMS(SMSCL smsInput)
        {
            SM smsQuery = dbcontext.SMS.Add(new SM
            {
                Id                 = smsInput.id,
                Template           = smsInput.template,
                StudentLeaveTypeId = smsInput.studentLeaveTypeId,
                DateCreated        = smsInput.dateCreated,
                DateModified       = smsInput.dateModified,
                IsDeleted          = smsInput.isDeleted,
            });

            dbcontext.SaveChanges();
            int SMSId = smsQuery.Id;

            return(SMSId);
        }
 public override void DoState()
 {
     if (t1 < PrepDuration) // prep timer - aim
     {
         t1 += Time.deltaTime;
     }
     else
     {
         if (prepPhase)
         {
             prepPhase  = false;
             shootPhase = true;
             //Boss.sp.color = Color.red;
             // SHOOT AT THE TARGETS
             Boss.ShootMortar(Boss.targets);
         }
         else
         {
             if (t2 < HitDuration) // shoot duration
             {
                 t2 += Time.deltaTime;
             }
             else
             {
                 if (shootPhase)
                 {
                     //Boss.sp.color = Color.green;
                     shootPhase  = false;
                     returnPhase = true;
                     SM.PlayAnimation(Tank_StateManager.AnimationState.Tank_ShootMortar_end);
                 }
                 else
                 {
                     if (t3 < ReturnDuration) // Return phase
                     {
                         t3 += Time.deltaTime;
                     }
                     else
                     {
                         SM.ChangeState(SM.Idle);
                     }
                 }
             }
         }
     }
 }
Exemple #20
0
        public override void UpdateInteraction(FVRViveHand hand)
        {
            base.UpdateInteraction(hand);

            // If we're already completely eaten return
            if (_currentStage == EatStages.Length)
            {
                return;
            }

            // Check if we're close enough to be eaten
            if (Vector3.Distance(transform.position, GM.CurrentPlayerBody.Head.transform.position + GM.CurrentPlayerBody.Head.transform.up * -0.2f) >= 0.150000005960464)
            {
                return;
            }

            // Check if it's been long enough since the last time we were eaten
            if (_lastEatTime + EatDelay > Time.time)
            {
                return;
            }

            // Play the eat sound
            _lastEatTime = Time.time;
            SM.PlayGenericSound(EatSound, transform.position);
            EatEvent.Invoke();
            GM.CurrentPlayerBody.HealPercent(HealPercent);
            if (_currentStage != EatStages.Length - 1 || DestroyOnEat)
            {
                EatStages[_currentStage].SetActive(false);
            }
            _currentStage++;

            // If we've eaten all the stages
            if (_currentStage == EatStages.Length && DestroyOnEat)
            {
                EndInteraction(hand);
                hand.ForceSetInteractable(null);
                Destroy(gameObject);
            }
            else
            {
                EatStages[_currentStage].SetActive(true);
            }
        }
Exemple #21
0
        /// <summary>
        /// Updates the Student Leave Type instance of Database from the client data.
        /// </summary>
        /// <param name="smsInput">Class Data from the Client Side.</param>
        /// <returns></returns>
        public SMSCL updateSMS(SMSCL smsInput)
        {
            SMSCL smsReturn = new SMSCL();
            SM    smsQuery  = (from x in dbcontext.SMS where x.Id == smsInput.id select x).FirstOrDefault();

            smsQuery.StudentLeaveTypeId = smsInput.studentLeaveTypeId;
            smsQuery.Template           = smsInput.template;
            smsQuery.DateCreated        = smsInput.dateCreated;
            smsQuery.DateModified       = smsInput.dateModified;
            smsQuery.IsDeleted          = smsInput.isDeleted;
            dbcontext.SaveChanges();
            smsReturn.studentLeaveTypeId = smsQuery.StudentLeaveTypeId;
            smsReturn.template           = smsQuery.Template;
            smsReturn.dateCreated        = smsQuery.DateCreated;
            smsReturn.dateModified       = smsQuery.DateModified;
            smsReturn.isDeleted          = smsQuery.IsDeleted;
            return(smsReturn);
        }
    private void ManageTabletClick()
    {
        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        if (Input.GetMouseButtonDown(0))
        {
            RaycastHit hit;
            if (Physics.Raycast(ray, out hit, 200f))
            {
                Tablet tablet = hit.collider.GetComponent <Tablet>();
                if (tablet != null)
                {
                    SM.Switch(WorldStateMachine.StateName.RollCall);
                    Debug.Log("tablet");
                }
            }
        }
    }
Exemple #23
0
        public static void CheckDeepEndsDownloaded()
        {
            var configuration = SM.Get<Configuration>();
            if (configuration.DeepEndsAssembliesDownloaded)
            {
                return;
            }

            DownloadDeepEnds();

            configuration.DeepEndsAssembliesDownloaded = true;

            SaveToFile();

            LoadFromFile();

            Log.Push(nameof(CheckDeepEndsDownloaded));
        }
Exemple #24
0
    private void OnTriggerEnter2D(Collider2D col)
    {
        if (col.gameObject.layer == SM.SoldierLayer && SM.GetArmy(col.transform) != army && dmgK > 0f)
        {
            float basicDmg   = (float)(SM._rnd.NextDouble()) * (maxBasicDmg - minBasicDmg) + minBasicDmg;
            bool  isCritical = SM._rnd.NextDouble() <= critPoss;
            basicDmg = isCritical ? basicDmg * critMult : basicDmg;
            float dmg = basicDmg * dmgDecK * dmgK * dKbyClass;

            foreach (WEffect eff in effects)
            {
                eff(col.transform, (col.transform.position - transform.parent.parent.position).normalized, dmg);
            }

            col.transform.GetComponent <Soldier>().TakeDamage(dmg);
            //Debug.Log(army + ": " + dmg + ((isCritical || dmgDecK < 1f) ? " (" : "") + (isCritical ? "  critical: x" + critMult : "") + (dmgDecK < 1f ? "  blocked: x" + dmgDecK : "") + ((isCritical || dmgDecK < 1f) ? "  )" : "") + ".");
        }
    }
Exemple #25
0
 public override IEnumerator OnEnterJoinBattle()
 {
     if (Target != null)
     {
         if (Target.transform.position.x > transform.position.x)
         {
             SetXdirection(false);
         }
         if (Target.transform.position.x < transform.position.x)
         {
             SetXdirection(true);
         }
         animationController.OnIdle();
         yield return(StartCoroutine(PlayerUnitUtils.AttackCoroutineAndInvokeAction(this, !PlayerUnitUtils.StandardConditionToAttack(this), dataLegacy.AttackRate, OnAttack)));
     }
     SM.SetState(States.PostBattle);
     yield break;
 }
Exemple #26
0
 public void SendMessage(string number, string message)
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         SM           sm     = new SM();
         sm.Number  = number;
         sm.Message = message;
         formatter.Serialize(stream, sm);
         stream.Seek(0, SeekOrigin.Begin);
         byte[] buffer = new byte[(int)stream.Length];
         stream.Read(buffer, 0, buffer.Length);
         stream.Close();
         ns.Write(buffer, 0, buffer.Length);
         ns.Flush();
     }
     catch { }
 }
Exemple #27
0
    private void EndAttack()
    {
        if (t3 < ReturnDuration)
        {
            t3 += Time.deltaTime;
            // Returning
            r2 += Time.deltaTime / ReturnDuration;
            Boss.transform.position = Vector3.Lerp(targetPos, endPos, r2);
        }
        else
        {
            // Back to Idle
            Boss.transform.position = endPos;

            Boss.JumpAttacksCount = 1;
            SM.ChangeState(SM.Idle);
        }
    }
        public void Get测试()
        {
            var arrEditCount = new int[6] {
                22, 2, 3, 5, 1, 11
            };                                                     //
            DateTime?startDate2 = new DateTime(2018, 3, 17);
            DateTime?endDate2   = ((DateTime)startDate2).AddDays(1);
            DateTime?startDate  = new DateTime(2018, 10, 17);
            DateTime?endDate    = ((DateTime)startDate).AddDays(1);

            var objs = LockDapperUtilTest <LockPers_> .New.Get(w =>
                                                               SM.In(w.EditCount, arrEditCount) &&
                                                               (w.InsertTime >= startDate && w.InsertTime < endDate || w.InsertTime >= startDate2 && w.InsertTime < endDate2) &&
                                                               w.IsDel == false
                                                               );

            WriteJson(objs);
        }
Exemple #29
0
        public override void UpdateInteraction(FVRViveHand hand)
        {
            base.UpdateInteraction(hand);

            if (hand.Input.TouchpadDown && hand.Input.TouchpadAxes.magnitude > 0.25f && MeatTrak != null)
            {
                Vector2 touchpadAxes = hand.Input.TouchpadAxes;

                if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.up) <= 45f)
                {
                    if (m_waitingForConfirmation)
                    {
                        MeatTrak.NumberTarget = 0;

                        if (Aud_ClearComplete.Clips.Count > 0)
                        {
                            SM.PlayCoreSound(FVRPooledAudioType.UIChirp, Aud_ClearComplete, this.transform.position);
                        }
                    }
                    else
                    {
                        if (Aud_ClearRequestConfirmation.Clips.Count > 0)
                        {
                            SM.PlayCoreSound(FVRPooledAudioType.UIChirp, Aud_ClearRequestConfirmation, this.transform.position);
                        }
                    }

                    m_waitingForConfirmation = !m_waitingForConfirmation;
                }

                if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.left) <= 45f || Vector2.Angle(hand.Input.TouchpadAxes, Vector2.right) <= 45f)
                {
                    int direction = (int)Mathf.Sign(touchpadAxes.x);
                    TrackingMode = (TrackingModes)Mathf.Repeat((float)TrackingMode + direction, ModeSprites.Length);

                    UpdateMode();

                    if (Aud_ModeSwitch.Clips.Count > 0)
                    {
                        SM.PlayCoreSound(FVRPooledAudioType.UIChirp, Aud_ModeSwitch, this.transform.position);
                    }
                }
            }
        }
Exemple #30
0
 /// <summary>
 /// Gets the Generation the <see cref="GameVersion"/> belongs to.
 /// </summary>
 /// <param name="game">Game to retrieve the generation for</param>
 /// <returns>Generation ID</returns>
 public static int GetMaxSpeciesID(this GameVersion game)
 {
     if (Gen1.Contains(game))
     {
         return(Legal.MaxSpeciesID_1);
     }
     if (Gen2.Contains(game))
     {
         return(Legal.MaxSpeciesID_2);
     }
     if (Gen3.Contains(game))
     {
         return(Legal.MaxSpeciesID_3);
     }
     if (Gen4.Contains(game))
     {
         return(Legal.MaxSpeciesID_4);
     }
     if (Gen5.Contains(game))
     {
         return(Legal.MaxSpeciesID_5);
     }
     if (Gen6.Contains(game))
     {
         return(Legal.MaxSpeciesID_6);
     }
     if (Gen7.Contains(game))
     {
         if (SM.Contains(game))
         {
             return(Legal.MaxSpeciesID_7);
         }
         if (USUM.Contains(game))
         {
             return(Legal.MaxSpeciesID_7_USUM);
         }
         if (GG.Contains(game))
         {
             return(Legal.MaxSpeciesID_7b);
         }
         return(Legal.MaxSpeciesID_7_USUM);
     }
     return(-1);
 }
        public void 事务更新测试ms()
        {
            var str = DateTime.Now.ToString();

            Console.WriteLine(str);
            var update = DBMSSql <Users> .Update().EditColumn(p => new bool[] { p.UserName == "事务修改 第一条语句", p.Password == str })
                         .Where(p => p.Id == 4 && SM.SQL(" IsDel = 'false' "));

            var update2 = DBMSSql <Users> .Update().EditColumn(p => new bool[] { p.UserName == "xxxxx 2 sql事务修改", p.Password == str })
                          .Where(p => p.Id == 6 && SM.SQL(" IsDel = 'false' "));

            Console.WriteLine(update.RawSqlParams().Item1);
            Console.WriteLine(update2.RawSqlParams().Item1);


            using (var conn = update.GetConn())
            {
                var trans = conn.BeginTransaction();
                try
                {
                    var efrow = conn.Execute(update.RawSqlParams().Item1.ToString(), update.RawSqlParams().Item2, trans);
                    Console.WriteLine(efrow + "第一执行了");

                    //throw new Exception("机房爆炸了");
                    var efrow2 = conn.Execute(update2.RawSqlParams().Item1.ToString(), update2.RawSqlParams().Item2, trans);
                    Console.WriteLine(efrow2 + "第2执行了");

                    trans.Commit();
                }
                catch (Exception ex)
                {
                    trans.Rollback();
                    Console.WriteLine(ex.Message);
                }
            }


            //var efrow = update.ExecuteUpdate();

            var rows = DBMSSql <Users> .Select().Column().From().Where(p => p.Id == 4 || p.Id == 6).ExecuteQuery();

            WriteJson(rows);
        }
 public static extern int GetSystemMetrics(SM nIndex);
		private static extern int GetSystemMetrics(SM nIndex); 
	void MyT4M()
	{
		if (CurrentSelect.GetComponent (typeof(T4MObjSC)))
		{
			GUILayout.BeginHorizontal();
				GUILayout.FlexibleSpace();	
				EnumMyT4MV = GUILayout.Toolbar(EnumMyT4MV, EnumMyT4M, GUILayout.Width(290), GUILayout.Height(20));
				GUILayout.FlexibleSpace();
			GUILayout.EndHorizontal();
					
			EditorGUILayout.Space();
			
			switch (EnumMyT4MV)
			{
				case 0:
				GUILayout.Label("Shader Model", EditorStyles.boldLabel);
				
				ShaderModel =(SM) EditorGUILayout.EnumPopup ("Shader Model", ShaderModel, GUILayout.Width(340));
				
				EditorGUILayout.Space();
				
				if (ShaderModel == SM.ShaderModel1){
					MenuTextureSM1 =(EnumShaderGLES1) EditorGUILayout.EnumPopup ("Shader", MenuTextureSM1, GUILayout.Width(340));
				}else if (ShaderModel == SM.ShaderModel2){	
					MenuTextureSM2 =(EnumShaderGLES2) EditorGUILayout.EnumPopup ("Shader", MenuTextureSM2, GUILayout.Width(340));
				}else if (ShaderModel == SM.ShaderModel3)
					MenuTextureSM3 =(EnumShaderGLES3) EditorGUILayout.EnumPopup ("Shader", MenuTextureSM3, GUILayout.Width(340));
				else CustomShader=EditorGUILayout.ObjectField("Select your Shader",CustomShader, typeof(Shader),true, GUILayout.Width(350)) as Shader;
				EditorGUILayout.Space();
				
		
				if (ShaderModel != SM.CustomShader){
				GUILayout.Label("Shader Compatibility", EditorStyles.boldLabel);
						EditorGUILayout.Space();
						EditorGUILayout.Space();
						GUILayout.BeginHorizontal();
							GUILayout.Label("GLES 1.1",GUILayout.Width(300));
							if(ShaderModel != SM.ShaderModel3 && ShaderModel != SM.ShaderModel2)
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ok.png", typeof(Texture)) as Texture);
							else
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ko.png", typeof(Texture)) as Texture);
						GUILayout.EndHorizontal();
						GUILayout.BeginHorizontal();
							GUILayout.Label("GLES 2",GUILayout.Width(300));
							if((ShaderModel == SM.ShaderModel1)|| (ShaderModel != SM.ShaderModel3) && (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_6_Textures_HighSpec)&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_4_Textures_Bumped)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_5_Textures_HighSpec )&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_3_Textures_Bumped_DirectionalLM)&& ( ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_6_Textures_Unlit_Lightmap_Compatible)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_World_Projection_HighSpec)
									&& (ShaderModel == SM.ShaderModel2 &&MenuTextureSM2 != EnumShaderGLES2.T4M_World_Projection_Unlit_Lightmap_Compatible)){
						
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ok.png", typeof(Texture)) as Texture);
							}else{
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ko.png", typeof(Texture)) as Texture);
							}
						GUILayout.EndHorizontal();
						GUILayout.BeginHorizontal();
							GUILayout.Label("Desktop",GUILayout.Width(300));
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ok.png", typeof(Texture)) as Texture);
						GUILayout.EndHorizontal();
						GUILayout.BeginHorizontal();
							GUILayout.Label("Unity WebPlayer",GUILayout.Width(300));
							GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ok.png", typeof(Texture)) as Texture);
							
						GUILayout.EndHorizontal();
						GUILayout.BeginHorizontal();
							GUILayout.Label("Flash",GUILayout.Width(300));
							if((ShaderModel == SM.ShaderModel1)|| (ShaderModel != SM.ShaderModel3) && (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_6_Textures_HighSpec)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_5_Textures_HighSpec) && (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_4_Textures_Bumped)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_3_Textures_Bumped)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_3_Textures_Bumped_SPEC)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_6_Textures_Unlit_Lightmap_Compatible)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_World_Projection_HighSpec)
									&& (ShaderModel == SM.ShaderModel2 &&MenuTextureSM2 != EnumShaderGLES2.T4M_World_Projection_Unlit_Lightmap_Compatible)
									)
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ok.png", typeof(Texture)) as Texture);
							else
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ko.png", typeof(Texture)) as Texture);
						GUILayout.EndHorizontal();
						GUILayout.BeginHorizontal();
							GUILayout.Label("NaCI",GUILayout.Width(300));
							if((ShaderModel == SM.ShaderModel1)|| (ShaderModel != SM.ShaderModel3) && (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_6_Textures_HighSpec)
									&& (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_5_Textures_HighSpec) && (ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_4_Textures_Bumped)&& ( ShaderModel == SM.ShaderModel2 && MenuTextureSM2 != EnumShaderGLES2.T4M_6_Textures_Unlit_Lightmap_Compatible))
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ok.png", typeof(Texture)) as Texture);
							else
								GUILayout.Label(Resources.LoadAssetAtPath(T4MEditorFolder+"Img/ko.png", typeof(Texture)) as Texture);
						GUILayout.EndHorizontal();
						
					}
				
				EditorGUILayout.Space();
				GUILayout.BeginHorizontal();
				GUILayout.Label("Master T4M Object", EditorStyles.boldLabel, GUILayout.Width(150));
				
				
				T4MMaster = EditorGUILayout.Toggle(T4MMaster);
				
				GUILayout.EndHorizontal();
				
					if(T4MMaster){
						GUILayout.BeginVertical("box");	
						
							GUILayout.BeginHorizontal();
							GUILayout.Label("Scene Camera", EditorStyles.boldLabel, GUILayout.Width(220));
							PlayerCam= EditorGUILayout.ObjectField(PlayerCam, typeof(Transform),true) as Transform;
						GUILayout.EndHorizontal();
						GUILayout.BeginHorizontal();
							GUILayout.Label("Activate LOD System  ", EditorStyles.boldLabel, GUILayout.Width(220));
							ActivatedLOD = EditorGUILayout.Toggle(ActivatedLOD);
						GUILayout.EndHorizontal();
						
						GUILayout.BeginHorizontal();
							GUILayout.Label("Activate Billboard System  ", EditorStyles.boldLabel, GUILayout.Width(220));
							ActivatedBillboard = EditorGUILayout.Toggle(ActivatedBillboard);
						GUILayout.EndHorizontal();
						
						GUILayout.BeginHorizontal();
							GUILayout.Label("Activate LayerCullDistance  ", EditorStyles.boldLabel, GUILayout.Width(220));
							ActivatedLayerCul = EditorGUILayout.Toggle(ActivatedLayerCul);
						GUILayout.EndHorizontal();
						EditorGUILayout.Space();
						if (ActivatedLayerCul){
							GUILayout.BeginVertical("box");
						
								GUILayout.Label("Maximum distances of view", EditorStyles.boldLabel, GUILayout.Width(220));
								EditorGUILayout.Space();
								CloseDistMaxView = EditorGUILayout.Slider("Close Distance",CloseDistMaxView,0,500);	
								NormalDistMaxView = EditorGUILayout.Slider("Middle Distance",NormalDistMaxView,0,500);	
								FarDistMaxView = EditorGUILayout.Slider("Far Distance",FarDistMaxView,0,500);
								BGDistMaxView = EditorGUILayout.Slider("BackGround Distance",BGDistMaxView,0,10000);
							GUILayout.EndVertical();
						} 
						
						if (BGDistMaxView<FarDistMaxView)
							BGDistMaxView = FarDistMaxView;
						else if (FarDistMaxView<NormalDistMaxView)
							FarDistMaxView = NormalDistMaxView;
						else if (NormalDistMaxView<CloseDistMaxView)
							NormalDistMaxView = CloseDistMaxView;
					GUILayout.EndVertical();
					}
						GUILayout.FlexibleSpace();
							GUILayout.BeginHorizontal();
								GUILayout.FlexibleSpace();
										if (GUILayout.Button("UPDATE", GUILayout.Width(100), GUILayout.Height(30))) {
											MyT4MApplyChange();
							
										}
								GUILayout.FlexibleSpace();
							GUILayout.EndHorizontal();
						GUILayout.FlexibleSpace();
				break;	
				case 1:
				EditorGUILayout.Space();
					GUILayout.BeginHorizontal();
						GUILayout.Label("ATS Foliage Wind Activation", EditorStyles.boldLabel, GUILayout.Width(220));
						CurrentSelect.gameObject.GetComponent <T4MObjSC>().ActiveWind= EditorGUILayout.Toggle(CurrentSelect.gameObject.GetComponent <T4MObjSC>().ActiveWind);
					GUILayout.EndHorizontal();
				EditorGUILayout.Space();
				GUILayout.BeginVertical("box");	
					EditorGUILayout.Space();
					GUILayout.BeginHorizontal();
						GUILayout.FlexibleSpace();
							if (GUILayout.Button("Download The Package",  GUILayout.Width(160), GUILayout.Height(15))) {
									Application.OpenURL ("http://u3d.as/content/forst/ats-mobile-foliage/2XM");
							}
						GUILayout.FlexibleSpace();
					GUILayout.EndHorizontal();
					EditorGUILayout.Space();
					EditorGUILayout.Space();
					EditorGUILayout.Space();
					CurrentSelect.gameObject.GetComponent <T4MObjSC>().TranslucencyColor= EditorGUILayout.ColorField ("Translucency Color ",CurrentSelect.gameObject.GetComponent <T4MObjSC>().TranslucencyColor);
					EditorGUILayout.Space();
					CurrentSelect.gameObject.GetComponent <T4MObjSC>().Wind = EditorGUILayout.Vector4Field("Wind Vector",CurrentSelect.gameObject.GetComponent <T4MObjSC>().Wind);
					EditorGUILayout.Space();
					CurrentSelect.gameObject.GetComponent <T4MObjSC>().WindFrequency = EditorGUILayout.Slider("Wind Frequency",CurrentSelect.gameObject.GetComponent <T4MObjSC>().WindFrequency,0,5);
					EditorGUILayout.Space();
					CurrentSelect.gameObject.GetComponent <T4MObjSC>().GrassWindFrequency = EditorGUILayout.Slider("Grass Wind Frequency",CurrentSelect.gameObject.GetComponent <T4MObjSC>().GrassWindFrequency,0,5);
					EditorGUILayout.Space();
					GUILayout.BeginHorizontal();
						GUILayout.FlexibleSpace();
							if (GUILayout.Button("Reset", GUILayout.Width(100), GUILayout.Height(15))) {
								CurrentSelect.gameObject.GetComponent <T4MObjSC>().TranslucencyColor= new Color(0.73f,0.85f,0.4f,1f);
								CurrentSelect.gameObject.GetComponent <T4MObjSC>().Wind = new Vector4(0.85f,0.075f,0.4f,0.5f);
								CurrentSelect.gameObject.GetComponent <T4MObjSC>().WindFrequency = 0.75f;
								CurrentSelect.gameObject.GetComponent <T4MObjSC>().GrassWindFrequency = 1.5f;
							}
					GUILayout.EndHorizontal();
				GUILayout.EndVertical();	
				GUILayout.FlexibleSpace();
							GUILayout.BeginHorizontal();
								GUILayout.FlexibleSpace();
										if (GUILayout.Button("UPDATE", GUILayout.Width(100), GUILayout.Height(30))) {
											MyT4MApplyChange();
							
										}
								GUILayout.FlexibleSpace();
							GUILayout.EndHorizontal();
				GUILayout.FlexibleSpace();	
					GUILayout.BeginHorizontal();
						GUILayout.FlexibleSpace();
							GUILayout.Label("By Forst (Lars)", EditorStyles.boldLabel, GUILayout.Width(105), GUILayout.Height(15));
					GUILayout.EndHorizontal();
					GUILayout.BeginHorizontal();
						GUILayout.FlexibleSpace();
							if (GUILayout.Button("Others Assets by Forst", "textarea", GUILayout.Width(140), GUILayout.Height(15))) {
								Application.OpenURL ("http://u3d.as/publisher/forst/1Lf");
							}
				GUILayout.EndHorizontal();
				EditorGUILayout.Space();
				break;
			}
		}else{
			GUILayout.BeginHorizontal();
					GUILayout.FlexibleSpace();
					GUILayout.Label("Please, select the T4M Object", EditorStyles.boldLabel);
					GUILayout.FlexibleSpace();
			GUILayout.EndHorizontal();
		}
	}
	void CheckShader(){
		
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel1/T4M 2 Textures Auto BeastLM 2DrawCall")){
			MenuTextureSM1 = EnumShaderGLES1.T4M_2_Textures_Auto_BeastLM_2DrawCall ;
			ShaderModel = SM.ShaderModel1;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel1/T4M 2 Textures ManualAdd BeastLM_1DC")){
			MenuTextureSM1 = EnumShaderGLES1.T4M_2_Textures_ManualAdd_BeastLM_1DC ;
			ShaderModel = SM.ShaderModel1;
		}else	
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel1/T4M 2 Textures ManualAdd CustoLM 1DC")){
			MenuTextureSM1 = EnumShaderGLES1.T4M_2_Textures_ManualAdd_CustoLM_1DC ;
			ShaderModel = SM.ShaderModel1;
		}else	
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Unlit/T4M 2 Textures Unlit LM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Unlit_Lightmap_Compatible;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Unlit/T4M 3 Textures Unlit LM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_Unlit_Lightmap_Compatible;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Unlit/T4M 4 Textures Unlit LM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_4_Textures_Unlit_Lightmap_Compatible;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Unlit/T4M 5 Textures Unlit LM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_5_Textures_Unlit_Lightmap_Compatible;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Unlit/T4M 6 Textures Unlit LM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_6_Textures_Unlit_Lightmap_Compatible;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Unlit/T4M 6 Textures Unlit NoL")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_6_Textures_Unlit_No_Lightmap;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Unlit/T4M World Projection Shader + LM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_World_Projection_Unlit_Lightmap_Compatible;
			ShaderModel = SM.ShaderModel2;
			UpSideTile = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetVector ("_Tiling");
			UpSideF = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_UpSide");
			BlendFac= CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_Blend");
			
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Diffuse/T4M 2 Textures")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_HighSpec;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Diffuse/T4M 3 Textures")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_HighSpec;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Diffuse/T4M 4 Textures")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_4_Textures_HighSpec;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Diffuse/T4M 5 Textures")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_5_Textures_HighSpec;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Diffuse/T4M 6 Textures")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_6_Textures_HighSpec;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Diffuse/T4M World Projection Shader")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_World_Projection_HighSpec;
			ShaderModel = SM.ShaderModel2;
			UpSideTile = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetVector ("_Tiling");
			UpSideF = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_UpSide");
			BlendFac= CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_Blend");
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Specular/T4M 2 Textures Spec")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Specular;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Specular/T4M 3 Textures Spec")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_Specular;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Specular/T4M 4 Textures Spec")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_4_Textures_Specular;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/MobileLM/T4M 2 Textures for Mobile")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_4_Mobile;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/MobileLM/T4M 3 Textures for Mobile")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_4_Mobile;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/MobileLM/T4M 4 Textures for Mobile")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_4_Textures_4_Mobile;
			ShaderModel = SM.ShaderModel2;
		}//else
		//if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/MobileLM/T4M World Projection Shader_Mobile")){
		//	MenuTextureSM2 = EnumShaderGLES2.T4M_World_Projection_Mobile;
		//	ShaderModel = SM.ShaderModel2;
		//	UpSideTile = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetVector ("_Tiling");
		//	UpSideF = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_UpSide");
		//	BlendFac= CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_Blend");
		//}
		else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Toon/T4M 2 Textures Toon")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Toon;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Toon/T4M 3 Textures Toon")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_Toon;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Toon/T4M 4 Textures Toon")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_4_Textures_Toon;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 2 Textures Bumped")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Bumped;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 3 Textures Bumped")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_Bumped;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 4 Textures Bumped")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_4_Textures_Bumped;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 2 Textures Bumped Mobile")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Bumped_Mobile;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 3 Textures Bumped Mobile")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_Bumped_Mobile;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 2 Textures Bump Specular Mobile")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Bumped_SPEC_Mobile;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/BumpDLM/T4M 2 Textures Bumped DLM Mobile")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Bumped_DirectionalLM_Mobile;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 2 Textures Bump Specular")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Bumped_SPEC;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/Bump/T4M 3 Textures Bump Specular")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_Bumped_SPEC;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/BumpDLM/T4M 2 Textures Bumped DLM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_2_Textures_Bumped_DirectionalLM;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel2/BumpDLM/T4M 3 Textures Bumped DLM")){
			MenuTextureSM2 = EnumShaderGLES2.T4M_3_Textures_Bumped_DirectionalLM;
			ShaderModel = SM.ShaderModel2;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Diffuse/T4M 2 Textures")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_2_Textures_Diffuse;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Diffuse/T4M 3 Textures")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_3_Textures_Diffuse;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Diffuse/T4M 3 Textures")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_3_Textures_Diffuse;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Diffuse/T4M 4 Textures")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_4_Textures_Diffuse;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Diffuse/T4M 5 Textures")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_5_Textures_Diffuse;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Diffuse/T4M 6 Textures")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_6_Textures_Diffuse;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Specular/T4M 2 Textures Spec")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_2_Textures_Specular;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Specular/T4M 3 Textures Spec")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_3_Textures_Specular;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Specular/T4M 4 Textures Spec")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_4_Textures_Specular;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Bump/T4M 2 Textures Bump")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_2_Textures_Bumped;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Bump/T4M 3 Textures Bump")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_3_Textures_Bumped;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/Bump/T4M 4 Textures Bump")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_4_Textures_Bumped;
			ShaderModel = SM.ShaderModel3;
		}
		else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/BumpSpec/T4M 2 Textures Bump Spec")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_2_Textures_Bumped_SPEC;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/BumpSpec/T4M 3 Textures Bump Spec")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_3_Textures_Bumped_SPEC;
			ShaderModel = SM.ShaderModel3;
		}else
		if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader == Shader.Find("T4MShaders/ShaderModel3/BumpSpec/T4M 4 Textures Bump Spec")){
			MenuTextureSM3 = EnumShaderGLES3.T4M_4_Textures_Bumped_SPEC;
			ShaderModel = SM.ShaderModel3;
		}else{
			ShaderModel = SM.CustomShader;
			CustomShader=CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.shader;
			if (CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.HasProperty("_Tiling")){
				UpSideTile = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetVector ("_Tiling");
				UpSideF = CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_UpSide");
				BlendFac= CurrentSelect.gameObject.GetComponent <T4MObjSC>().T4MMaterial.GetFloat ("_Blend");
				
			}
		}		
					
	}
Exemple #36
0
 internal static extern int GetSystemMetrics(SM smIndex);
 public SearchComponent(SM searchMode, object value, CM conditionMode)
 {
     this._searchmode = searchMode;
       this._value = value;
       this._conditionMode = conditionMode;
 }