public void ShowFullCombo(ComboType fullComboType) { switch (fullComboType) { case ComboType.RAISE_WAVE: fullCombo.sprite = uiSet.fullComboSprites[0]; break; case ComboType.HALF_MOON: fullCombo.sprite = uiSet.fullComboSprites[1]; break; case ComboType.CLOUD_CUT: fullCombo.sprite = uiSet.fullComboSprites[2]; break; case ComboType.WALKING_DEATH: fullCombo.sprite = uiSet.fullComboSprites[3]; break; case ComboType.CRASH_GENERAL: fullCombo.sprite = uiSet.fullComboSprites[4]; break; case ComboType.FLYING_DRAGON: fullCombo.sprite = uiSet.fullComboSprites[5]; break; default: return; } fullCombo.gameObject.SetActive(true); UITween.Instance.Bounce(fullCombo.gameObject, 2, 0.25f, 2, 0); }
protected override ComboType GetComboType() { ComboType[] combos = new ComboType[] { ComboType.RAISE_WAVE, ComboType.HALF_MOON, ComboType.CLOUD_CUT, ComboType.WALKING_DEATH, ComboType.CRASH_GENERAL, ComboType.FLYING_DRAGON }; return(combos[Random.Range(0, combos.Length)]); }
public ComboClearing(ComboType type, DateTime time, int count, long size) { _type = type; ClearingTime = time; ClearingCount = count; ClearingSize = size; }
void ResetComboState(bool resetName) { //if the bool that you pass to the method is true if (resetName) { comboTimer_ -= Time.deltaTime; //If the parameter bool is set to true, a timer starts, when the timer runs out //m_CurrentComboState is set back to IDLE. if (comboTimer_ <= 0) { m_CurrentComboState = ComboType.IDLE; projectileChain_ = 0; meleeChain_ = 0; activateComboTimerReset_ = false; m_IsHitting = false; //combo is over so set player back to idle by setting all combo bools to false for (int i = 0; i < projectileCombo_.Length; ++i) { projectileCombo_[i] = false; } for (int i = 0; i < meleeCombo.Length; ++i) { meleeCombo[i] = false; } for (int i = 0; i < combinedCombos.Length; ++i) { combinedCombos[i] = false; } UpdateComboAnimations(); comboTimer_ = m_ComboTimerLength; } } }
/// <summary> /// Draws the inspector for a combo attack. /// </summary> /// <param name="attack">Attack.</param> virtual protected void DrawComboAttackEditor(ComboAttackData attack) { string name = EditorGUILayout.TextField(new GUIContent("Name", "Human readable name (optional)."), attack.name); if (name != attack.name) { attack.name = name; EditorUtility.SetDirty(target); } EditorGUILayout.LabelField("Combo Data", EditorStyles.boldLabel); // Type ComboType comboType = (ComboType)EditorGUILayout.EnumPopup(new GUIContent("Combo Type ", "What type of combo move is this."), attack.comboType); if (comboType != attack.comboType) { attack.comboType = comboType; EditorUtility.SetDirty(target); } EditorGUILayout.HelpBox(comboType.GetDescription(), MessageType.Info); // Inital Attack string initialAttack = EditorGUILayout.TextField(new GUIContent("Initial Attack", "Human readable name (optional)."), attack.initialAttack); if (initialAttack != attack.initialAttack) { attack.initialAttack = initialAttack; EditorUtility.SetDirty(target); } // Window float min = attack.minWindowTime; float max = attack.maxWindowTime; EditorGUILayout.MinMaxSlider(new GUIContent("Trigger Window", "The window within the initial attack where the combos action button must be pressed (normalised time)."), ref min, ref max, 0, 1); if (min > 0.9f) { min = 0.9f; } if (max <= min + 0.1f) { max = min + 0.1f; } if (min != attack.minWindowTime || max != attack.maxWindowTime) { attack.minWindowTime = min; attack.maxWindowTime = max; EditorUtility.SetDirty(target); } // Combo count EditorGUILayout.LabelField("Attack Data", EditorStyles.boldLabel); DrawBasicAttackEditor(attack); }
public BulletElement(float dmg, float spd, Color clr, ComboType type, float size = 1) { Damage = dmg; Speed = spd; bulletColor = clr; this.type = type; Size = size; bulletColor = Color.red; }
public void SetCombo(ComboType comboStyle) { var teste = MainMenu.Item("koreanzed.combomenu.combostyle") .SetValue <StringList>( new StringList(new string[] { "All Star", "The Line" }) { SelectedIndex = (int)comboStyle }); }
/// <summary> /// Attack the specified combo. /// </summary> /// <param name='combo'> /// Combo. /// </param> private void Attack(ComboType combo) { foreach (GameObject turret in _turrets) { if (turret != null) { float distance = Vector3.Distance(turret.transform.position, _player.transform.position); Vector3 dir = (turret.transform.position - _player.transform.position).normalized; //Verifica se o player está de frente para o inimigo ou de costas: //Vector3.Dot retorna um valor > 0 se o player está de frente para o inimigo. float direction = Vector3.Dot(dir, _player.transform.forward); //Se satisfizer a distância e direção, desconta a vida do inimigo. if (distance < 3.0f && direction > 0f) { if (combo == ComboType.PUNCH && !_player.animation.IsPlaying("gods_hand")) { if (turret.gameObject.GetComponent<TurretManager>().Health.CurrentHealth > 0) { _player.animation.CrossFade("punch_on_the_ground"); GameObject.Instantiate(this._particlePunchGround, _player.transform.position, Quaternion.identity); } this._punchHitOnGround = true; turret.gameObject.GetComponent<TurretManager>().Health.UpdateHealth(-1 * (int)ComboType.PUNCH); if (turret.gameObject.GetComponent<TurretManager>().Health.CurrentHealth <= 0) { _turrets.Remove(turret.gameObject); break; } } } } } if (combo == ComboType.PUNCH && !_player.animation.IsPlaying("gods_hand") && !_punchHitOnGround) { _player.animation.CrossFade("punch"); _numberHit = 0; } if (combo == ComboType.DOUBLEPUNCH && !_player.animation.IsPlaying("gods_hand")) { _player.animation.CrossFade("double_punch"); _numberHit = 0; } if (combo == ComboType.GODSHAND) { _player.animation.CrossFade("gods_hand"); _numberHit = 0; } }
public static string GetDescription(this ComboType me) { switch (me) { case ComboType.QUEUED: return("The combo attack is triggered by pressing a button during the initial attack and will start when the inital attack finishes."); case ComboType.POST_HIT: return("The combo attack is triggered by pressing a button after successfully hitting an enemy and will start when the inital attack finishes."); case ComboType.CANCEL: return("The combo attack is triggered by pressing a button and starts straight away cancelling the existing attack"); } return("No information available."); }
public int GetComboAttackCount(ComboType comboType) { for (int i = 0; i < _comboAttacks.Count; ++i) { Combo combo = _comboAttacks[i]; if (combo.comboType == comboType) { return(combo.comboSteps.Length); } } return(0); }
public override void OnEnter() { _comboType = GetComboType(); int attackCount = Agent.AnimSet.GetComboAttackCount(_comboType); if (attackCount == 0) { return; } _remainAttackCount = UnityEngine.Random.Range(1, attackCount + 1); Agent.AnimSet.ResetComboProgress(); SendEvent(); }
void completeCombo(ComboType combo) //# completes a combo, clearing the plates (if it's nonpartial) and adding the score { GameManager.Instance.addScore(combo.score); Debug.Log(string.Format("You have completed the {0} combo", combo.entityName)); if (!combo.isPartial) //# as long as it's not a partial combo, clears the plates by removing everything from CurrentCombo { hasCompleted = true; } //# insert some kind of communication with player }
public UnitSkill() { var unitSkillData = (UnitSkillData)skillData; costMP = unitSkillData.costMP; costHP = unitSkillData.costHP; skillRange = unitSkillData.skillRange; hoverRange = unitSkillData.hoverRange; skillRate = unitSkillData.skillRate; comboType = unitSkillData.comboType; skillType = unitSkillData.skillType; skillClass = unitSkillData.skillClass; rangeType = unitSkillData.rangeType; animID = unitSkillData.animID; }
bool isComboComplete(out ComboType completedCombo) //# checks whether any combo is complete { foreach (ComboType combo in allCombos) { if (isComplete(combo)) { completedCombo = combo; return(true); } ; } completedCombo = null; return(false); }
private static void LoadCombos(Bot bot, string XMLFilename) { var xmldoc = new XmlDocument(); xmldoc.Load(XMLFilename); foreach (XmlNode comboXml in xmldoc.DocumentElement.SelectNodes("//Combo")) { var combo = new Combo(); ComboType tmp = 0; string stInput = ""; if (comboXml.ParentNode.LocalName == "Starter") { foreach (XmlAttribute attr in comboXml.ParentNode.Attributes) { PropertyInfo propertyInfo = combo.GetType().GetProperty(attr.Name); if (propertyInfo.PropertyType.IsEnum) { propertyInfo.SetValue(combo, Enum.Parse(typeof(ComboType), attr.Value)); } else { propertyInfo.SetValue(combo, Convert.ChangeType(attr.Value, propertyInfo.PropertyType), null); } } tmp = combo.Type; stInput = combo.Input; } foreach (XmlAttribute attr in comboXml.Attributes) { PropertyInfo propertyInfo = combo.GetType().GetProperty(attr.Name); if (propertyInfo.PropertyType.IsEnum) { propertyInfo.SetValue(combo, Enum.Parse(typeof(ComboType), attr.Value)); } else { propertyInfo.SetValue(combo, Convert.ChangeType(attr.Value, propertyInfo.PropertyType), null); } } combo.Type = combo.Type | tmp; if (stInput != "") { combo.Input = stInput + "." + combo.Input; } bot.getComboList().Add(combo); } }
public CredentialsList(IEnumerable <string> usernames, IEnumerable <string> passwords, ComboType type = ComboType.ChangePass, int position = 0) { _list1 = new List <IEnumerable <string> >(); _list2 = new List <IEnumerable <string> >(); _type = type; var userlist = usernames.ToList(); while (userlist.Count > 0) { string[] array = new string[10000]; if (userlist.Count >= 10000) { userlist.CopyTo(0, array, 0, 10000); _list1.Add(array); userlist.RemoveRange(0, 10000); } else { _list1.Add(userlist.ToArray()); userlist.RemoveRange(0, userlist.Count); } } var passlist = passwords.ToList(); while (passlist.Count > 0) { string[] array = new string[10000]; if (passlist.Count >= 10000) { passlist.CopyTo(0, array, 0, 10000); _list2.Add(array); passlist.RemoveRange(0, 10000); } else { _list2.Add(passlist.ToArray()); passlist.RemoveRange(0, passlist.Count); } } if (position > 0 && position < Count) { SetPosition(position); } }
bool isComplete(ComboType combo) { if (currentCombo.Count != combo.foods.Length) { return(false); } foreach (FoodType food in combo.foods) { if (!isInCurrentCombo(food)) { return(false); } } return(true); }
private void HandleComboEvent(ComboType combo) { switch (combo) { case ComboType.Dash: Dash(); break; case ComboType.DashBack: DashBack(); break; default: break; } }
public void ChangeComboBullets(ComboType type) { switch (type) { case ComboType.Double: foreach (Image img in bulletsPlaces) { img.sprite = _double; } break; case ComboType.Ricoshet: foreach (Image img in bulletsPlaces) { img.sprite = _ricoshet; } break; case ComboType.Demonic: foreach (Image img in bulletsPlaces) { img.sprite = _demonic; } break; case ComboType.Ghost: foreach (Image img in bulletsPlaces) { img.sprite = _ghost; } break; case ComboType.Vampire: foreach (Image img in bulletsPlaces) { img.sprite = _vampire; } break; case ComboType.Shotgun: foreach (Image img in bulletsPlaces) { img.sprite = _shotgun; } break; } }
private void Attack(ComboType combo) { //Debug.Log (combo); foreach (HumanoidManager humanoid in HumanoidsList) { float distance = Vector3.Distance (humanoid.MyTransform.position, transform.position); Vector3 dir = (humanoid.MyTransform.position - transform.position).normalized; //Verifica se o player está de frente para o inimigo ou de costas: //Vector3.Dot retorna um valor > 0 se o player está de frente para o inimigo. float direction = Vector3.Dot (dir, transform.forward); //Se satisfizer a distância e direção, desconta a vida do inimigo. if (distance < 0.8f && direction > 0f) humanoid.Health.UpdateHealth (-1 * (int)combo); } }
public static Board boardC(ComboType ct, int intersect, bool isSz, bool isZz, Draw draw) { var pos = Convert.ToByte(Common.RANDOM.Next(1, 13)); var board = Builder.board<BoardC>(Builder.playslip<PlayslipC>(new Game()), pos); board.Combo = (byte)ct; draw.Take(intersect).Each(board.touch); if(isZz) board.touch(draw.Zz); while(board.Guesses.Count() < (byte)ct) board.touch(NumberUtil.one(new List<byte>(draw) { draw.Zz })); if(isSz) while(board.Playslip.Sz != draw.Sz) board.Playslip.Nr.change(); else while(board.Playslip.Sz == draw.Sz) board.Playslip.Nr.change(); return board; }
public AnimAttackData ProcessCombo(ComboType comboType) { for (int i = 0; i < _comboAttacks.Count; ++i) { Combo combo = _comboAttacks[i]; if (combo.comboType != comboType) { continue; } int len = combo.comboSteps.Length; if (len == 0) { return(null); } return(combo.comboSteps[_curAttackIdx++ % len].data); } return(null); }
public AnimAttackData ProcessSingle(ComboType comboType) { for (int i = 0; i < _comboAttacks.Count; ++i) { Combo combo = _comboAttacks[i]; if (combo.comboType != comboType) { continue; } int len = combo.comboSteps.Length; if (len == 0) { return(null); } // 返回随机一记单招 return(combo.comboSteps[Random.Range(0, len)].data); } return(null); }
void onUpdate(ComboType _currentCombo) { for (int i = 0; i < 4; i++) { Image currImage = transform.GetChild(i).GetChild(0).GetComponent <Image>(); if (i >= _currentCombo.foods.Length) { currImage.color = Color.clear; currImage.sprite = null; continue; } Sprite newSprite = _currentCombo.foods[i].FoodImg; currImage.color = Color.white; currImage.sprite = newSprite; } }
private void Game_OnWndProc(WndEventArgs args) { if (animating) { return; } if (args.WParam == 4 && MouseOnChampion() && (args.Msg == (uint)WindowsMessages.WM_LBUTTONUP)) { if (ComboStyle == ComboType.AllStar) { TheLineAnimation(); ComboStyle = ComboType.TheLine; } else { AllStarAnimation(); ComboStyle = ComboType.AllStar; } } }
public void ShowCombo(ushort ComboCount, bool bCRI /*必杀*/) { if (m_BaseWndObject.activeSelf != true) { m_BaseWndObject.SetActive(true); } m_LifeTime = DoubleHit.IntervalTime; m_ComboCount = ComboCount; m_bCRI = bCRI; if (!bCRI) { if (m_Combo[1].m_Object.activeSelf != false) { m_Combo[1].m_Object.SetActive(false); } m_Combo[0].m_Object.SetActive(true); m_CobmoTyp = ComboType.Combo_0; ExchangeBg(ComboCount); } else { if (m_Combo[0].m_Object.activeSelf != false) { m_Combo[0].m_Object.SetActive(false); } m_Combo[1].m_Object.SetActive(true); m_CobmoTyp = ComboType.Combo_1; GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_KillBuff); } if (m_IsMySelf) { Vector2 Panle_set = m_Combo[(int)m_CobmoTyp].m_Panle_Energy.clipOffset; Panle_set.x = 0; m_Combo[(int)m_CobmoTyp].m_Panle_Energy.clipOffset = Panle_set; } PlayTween(); }
private static void RefreshComboType() { var xCombo = Config.Item("ComboSetOption").GetValue <StringList>().SelectedIndex; switch (xCombo) { case 0: vComboType = Q.Level > W.Level ? ComboType.ComboQR : ComboType.ComboWR; break; case 1: //Q-R vComboType = ComboType.ComboQR; break; case 2: //W-R vComboType = ComboType.ComboWR; break; case 3: //E-R vComboType = ComboType.ComboER; break; } }
private static void RefreshComboType() { var xCombo = Config.ComboOption; switch (xCombo) { case 0: vComboType = Q.Level > W.Level ? ComboType.ComboQR : ComboType.ComboWR; break; case 1: vComboType = ComboType.ComboQR; break; case 2: vComboType = ComboType.ComboWR; break; case 3: vComboType = ComboType.ComboER; break; } }
private static void RefreshComboType() { var xCombo = comboMenu["combomode"].Cast <ComboBox>().CurrentValue; switch (xCombo) { case 0: LBcomboType = _q.Level > _w.Level ? ComboType.qr : ComboType.ComboWR; break; case 1: //Q-R LBcomboType = ComboType.qr; break; case 2: //W-R LBcomboType = ComboType.ComboWR; break; case 3: //E-R LBcomboType = ComboType.ComboER; break; } }
private static void RefreshComboType() { var xCombo = getBoxItem(comboMenu, "ComboMode"); switch (xCombo) { case 0: vComboType = Q.Level > W.Level ? ComboType.ComboQR : ComboType.ComboWR; break; case 1: //Q-R vComboType = ComboType.ComboQR; break; case 2: //W-R vComboType = ComboType.ComboWR; break; case 3: //E-R vComboType = ComboType.ComboER; break; } }
public DataView GetComboView(ComboType type) { string query = ""; switch (type) { case ComboType.MaterialFunction: query = ComboListRepository.MaterialFunctionQuery; break; case ComboType.Currency: query = ComboListRepository.CurrencyQuery; break; case ComboType.Unit: query = ComboListRepository.UnitQuery; break; case ComboType.Signal: query = ComboListRepository.SignalQuery; break; case ComboType.SemiProduct: query = ComboListRepository.SemiProductType; break; default: break; } DataTable table = _repository.GetAll(query); DataView view = new DataView(table) { Sort = "name" }; return(view); }
/************************************************************ * Function name : SetDropDownList * Purpose : DropDownList에 DataTable을 바인딩 처리 * Input : DropDownList rDropDownList, DataTable rItems * Output : void *************************************************************/ public static void SetYearDropDownList(DropDownList rDropDownList, ComboType rType) { rDropDownList.Items.Clear(); //rDropDownList.Items.Add(new ListItem("*")); switch (rType) { case ComboType.All: rDropDownList.Items.Add(new ListItem("*")); break; case ComboType.NullAble: rDropDownList.Items.Add(new ListItem("")); break; } int xPrevYear = DateTime.Now.AddYears(-12).Year; int xNextYear = DateTime.Now.AddYears(5).Year; for (int i = xPrevYear; i <= xNextYear; i++) { rDropDownList.Items.Add(new ListItem(i.ToString(), i.ToString())); } }
private void combocent_SelectedIndexChanged(object sender, EventArgs e) { NumCentral = pr.GetNumber(combocent.Text); if (combocent.Text != CentrlName) { CentrlName = combocent.Text; Main.CabelInfo.Clear(); ComboType.Items.Clear(); MyList.Clear(); var DBonWork = new DB.SmartCentralDB(Properties.Settings.Default.ConctToDataBase); var SelectAllCabel = (from c in DBonWork.Cabels where c.IDcentral == NumCentral select new { c.IDCable, c.CableNumber }); foreach (var item in SelectAllCabel) { Main.CabelInfo.Add(item.IDCable, item.CableNumber); ComboType.Items.Add(item.CableNumber); } var j = from c in DBonWork.Cabels where c.IDcentral == NumCentral from p in DBonWork.Cabinas where p.IDCable == c.IDCable select p.CabinaGeneral; foreach (var item in j) { MyList.Add(item); } } if (button1.Text == "حفظ") { CabinaCabel.Clear(); } label6.Text = ""; ODU.Clear(); ComboType.Focus(); }
/* float roolInt(string i){ var ic = (float)Convert.ToDouble(i); if(ic == 0.9f){ return 0f; }else{ return ic+0.1f; } } */ public void ComboStop(bool miss) { if(!timeCombo.ContainsKey(timetotalchart)) timeCombo.Add(timetotalchart, combo); combo = 0; if(ct != ComboType.NONE){ switch(ct){ case ComboType.FULLFANTASTIC: firstEx = timetotalchart; firstGreat = timetotalchart; firstMisteak = timetotalchart; break; case ComboType.FULLEXCELLENT: firstGreat = timetotalchart; firstMisteak = timetotalchart; break; case ComboType.FULLCOMBO: firstMisteak = timetotalchart; break; } ct = ComboType.NONE; } thetab = comboDecoupe(); if(isFullComboRace || isFullExComboRace){ //Debug.Log ("Fail at combo race"); fail = true; } if(miss){ comboMisses++; }else{ comboMisses = 0; } }
public void GainCombo(int c, Precision prec) { combo+= c; alphaCombo = 1f; if(ct != ComboType.NONE && prec != Precision.FANTASTIC){ if(ct == ComboType.FULLFANTASTIC){ switch(prec){ case Precision.EXCELLENT: ct = ComboType.FULLEXCELLENT; firstEx = timetotalchart; break; case Precision.GREAT: ct = ComboType.FULLCOMBO; firstEx = timetotalchart; firstGreat = timetotalchart; break; default: firstEx = timetotalchart; firstGreat = timetotalchart; firstMisteak = timetotalchart; ct = ComboType.NONE; break; } }else if(ct == ComboType.FULLEXCELLENT && prec > Precision.EXCELLENT){ if( prec == Precision.GREAT){ firstGreat = timetotalchart; ct = ComboType.FULLCOMBO; } else { firstGreat = timetotalchart; firstMisteak = timetotalchart; ct = ComboType.NONE; } }else if(ct == ComboType.FULLCOMBO && prec > Precision.GREAT){ firstMisteak = timetotalchart; ct = ComboType.NONE; } } thetab = comboDecoupe(); if(isFullExComboRace && ct == ComboType.FULLCOMBO){ //Debug.Log("Fail at FEC race"); fail = true; } }
//Start void Start() { //Data from option speedmod = DataManager.Instance.speedmodSelected*speedmodRate; DataManager.Instance.LoadScoreJudge(DataManager.Instance.scoreJudgeSelected); DataManager.Instance.LoadHitJudge(DataManager.Instance.hitJudgeSelected); DataManager.Instance.LoadLifeJudge(DataManager.Instance.lifeJudgeSelected); isFullComboRace = DataManager.Instance.raceSelected == 9; isFullExComboRace = DataManager.Instance.raceSelected == 10; targetScoreInverse = DataManager.Instance.giveTargetScoreOfRace(DataManager.Instance.raceSelected); typeOfDeath = DataManager.Instance.deathSelected; KeyCodeDown = DataManager.Instance.KeyCodeDown; KeyCodeUp = DataManager.Instance.KeyCodeUp; KeyCodeLeft = DataManager.Instance.KeyCodeLeft; KeyCodeRight = DataManager.Instance.KeyCodeRight; SecondaryKeyCodeDown = DataManager.Instance.SecondaryKeyCodeDown; SecondaryKeyCodeUp = DataManager.Instance.SecondaryKeyCodeUp; SecondaryKeyCodeLeft = DataManager.Instance.SecondaryKeyCodeLeft; SecondaryKeyCodeRight = DataManager.Instance.SecondaryKeyCodeRight; speedmodSelected = DataManager.Instance.speedmodSelected; speedmodstring = DataManager.Instance.speedmodSelected.ToString("0.00"); speedmodok = true; var rand = (int)(UnityEngine.Random.value*DataManager.Instance.skyboxList.Count); if(rand == DataManager.Instance.skyboxList.Count){ rand--; } //Arrows for(int i=0;i<4;i++){ if(i != DataManager.Instance.skinSelected){ var go = GameObject.Find("ArrowSkin" + i); Destroy(go); var go2 = GameObject.Find("ArrowModelSkin" + i); Destroy(go2); } } arrow = typeArrow.ElementAt(DataManager.Instance.skinSelected); var modelskin = GameObject.Find("ArrowModelSkin" + DataManager.Instance.skinSelected); modelskin.SetActiveRecursively(false); arrowLeft = (GameObject) Instantiate(modelskin, new Vector3(0f, 0f, 2f), modelskin.transform.rotation); if(DataManager.Instance.skinSelected == 3){ arrowLeft.transform.FindChild("RotationCenter").Rotate(0f, 0f, 90f); }else if(DataManager.Instance.skinSelected != 0){ arrowLeft.transform.Rotate(0f, 0f, 90f); arrowLeft.transform.FindChild("ParticulePrec").Rotate(0f, 0f, -90f); arrowLeft.transform.FindChild("ParticulePrec").localPosition = new Vector3(-1f, 0f, 0f); } arrowLeft.transform.parent = MainCamera.gameObject.transform; arrowRight = (GameObject) Instantiate(modelskin, new Vector3(6f, 0f, 2f), modelskin.transform.rotation); if(DataManager.Instance.skinSelected == 3){ arrowRight.transform.FindChild("RotationCenter").Rotate(0f, 0f, -90f); }else if(DataManager.Instance.skinSelected == 1){ arrowRight.transform.Rotate(0f, 0f, -90f); arrowRight.transform.FindChild("ParticulePrec").Rotate(0f, 0f, 90f); arrowRight.transform.FindChild("ParticulePrec").localPosition = new Vector3(1f, 0f, 0f); } arrowRight.transform.parent = MainCamera.gameObject.transform; arrowDown = (GameObject) Instantiate(modelskin, new Vector3(2f, 0f, 2f), modelskin.transform.rotation); if(DataManager.Instance.skinSelected == 3){ arrowDown.transform.FindChild("RotationCenter").Rotate(0f, 0f, 180f); }else if(DataManager.Instance.skinSelected == 1){ arrowDown.transform.Rotate(0f, 0f, 180f); arrowDown.transform.FindChild("ParticulePrec").Rotate(0f, 0f, -180f); arrowDown.transform.FindChild("ParticulePrec").localPosition = new Vector3(0f, 1f, 0f); } arrowDown.transform.parent = MainCamera.gameObject.transform; arrowUp = (GameObject) Instantiate(modelskin, new Vector3(4f, 0f, 2f), modelskin.transform.rotation); arrowUp.transform.parent = MainCamera.gameObject.transform; arrowTarget = new Transform[4]; arrowTarget[0] = arrowLeft.transform; arrowTarget[1] = arrowDown.transform; arrowTarget[2] = arrowUp.transform; arrowTarget[3] = arrowRight.transform; scaleBase = arrowTarget[0].localScale.x; matArrowModel = matSkinModel[DataManager.Instance.skinSelected]; RenderSettings.skybox = DataManager.Instance.skyboxList.ElementAt(rand); DataManager.Instance.skyboxIndexSelected = rand; displayValue = DataManager.Instance.displaySelected; firstArrow = -10f; lastArrow = -10f; thesong = DataManager.Instance.songSelected; songLoaded = thesong.GetAudioClip(); audio.loop = false; createTheChart(thesong); Application.targetFrameRate = -1; QualitySettings.vSyncCount = 0; nextSwitchBPM = 1; nextSwitchStop = 0; actualBPM = thesong.bpms.First().Value; actualstop = (double)0; changeBPM = 0; _count = 0L; timebpm = (double)0; timechart = 0f;//-(float)thesong.offset; timetotalchart = (double)0; arrowFrozen = new Dictionary<Arrow, float>(); precRight = new Dictionary<string, ParticleSystem>(); precLeft = new Dictionary<string, ParticleSystem>(); precUp = new Dictionary<string, ParticleSystem>(); precDown = new Dictionary<string, ParticleSystem>(); clearcombo = new Dictionary<string, ParticleSystem>(); //Prepare the scene foreach(var el in Enum.GetValues(typeof(PrecParticle))){ precLeft.Add( el.ToString(), (ParticleSystem) arrowLeft.transform.FindChild("ParticulePrec").gameObject.transform.FindChild(el.ToString()).particleSystem ); precDown.Add( el.ToString(), (ParticleSystem) arrowDown.transform.FindChild("ParticulePrec").gameObject.transform.FindChild(el.ToString()).particleSystem ); precRight.Add( el.ToString(), (ParticleSystem) arrowRight.transform.FindChild("ParticulePrec").gameObject.transform.FindChild(el.ToString()).particleSystem ); precUp.Add( el.ToString(), (ParticleSystem) arrowUp.transform.FindChild("ParticulePrec").gameObject.transform.FindChild(el.ToString()).particleSystem ); } for(int i=0; i< particleComboCam.transform.GetChildCount(); i++){ clearcombo.Add(particleComboCam.transform.GetChild(i).name, particleComboCam.transform.GetChild(i).particleSystem); } precAverage = new List<double>(); timeCombo = new Dictionary<double, int>(); lifeGraph = new Dictionary<double, double>(); TMainCamera = MainCamera.transform; MoveCameraBefore(); //Textures TextureBase = new Dictionary<string, Texture2D>(); TextureBase.Add("FANTASTIC", (Texture2D) Resources.Load("Fantastic")); TextureBase.Add("EXCELLENT", (Texture2D) Resources.Load("Excellent")); TextureBase.Add("GREAT", (Texture2D) Resources.Load("Great")); TextureBase.Add("DECENT", (Texture2D) Resources.Load("Decent")); TextureBase.Add("WAYOFF", (Texture2D) Resources.Load("Wayoff")); TextureBase.Add("MISS", (Texture2D) Resources.Load("Miss")); for(int i=0; i<10; i++){ TextureBase.Add("S" + i, (Texture2D) Resources.Load("Numbers/S" + i)); TextureBase.Add("C" + i, (Texture2D) Resources.Load("Numbers/C" + i)); } TextureBase.Add("PERCENT", (Texture2D) Resources.Load("Numbers/Percent")); TextureBase.Add("DOT", (Texture2D) Resources.Load("Numbers/Dot")); TextureBase.Add("COMBODISPLAY", (Texture2D) Resources.Load("DisplayCombo")); TextureBase.Add("BLACK", (Texture2D) Resources.Load("black")); TextureBase.Add("FAIL", (Texture2D) Resources.Load("Fail")); TextureBase.Add("CLEAR", (Texture2D) Resources.Load("Clear")); TextureBase.Add("FC", (Texture2D) Resources.Load("FC")); TextureBase.Add("FEC", (Texture2D) Resources.Load("FEC")); TextureBase.Add("FFC", (Texture2D) Resources.Load("FFC")); TextureBase.Add("PERFECT", (Texture2D) Resources.Load("Perfect")); //stuff scoreToDisplay = Precision.NONE; timeDisplayScore = Mathf.Infinity; sensFantastic = true; alpha = 1f; scenechartfaded = false; //init score and lifebase scoreBase = new Dictionary<string, float>(); scoreCount = new Dictionary<string, int>(); lifeBase = new Dictionary<string, float>(); fantasticValue = 100f/(thesong.numberOfStepsWithoutJumps + thesong.numberOfJumps + thesong.numberOfFreezes + thesong.numberOfRolls); foreach(Precision el in Enum.GetValues(typeof(Precision))){ if(el != Precision.NONE){ scoreBase.Add(el.ToString(), fantasticValue*DataManager.Instance.ScoreWeightValues[el.ToString()]); lifeBase.Add(el.ToString(), DataManager.Instance.LifeWeightValues[el.ToString()]); } } foreach(ScoreCount el2 in Enum.GetValues(typeof(ScoreCount))){ if(el2 != ScoreCount.NONE){ scoreCount.Add(el2.ToString(), 0); } } life = 50f; lifeGraph.Add(0, life); score = 0f; scoreInverse = 100f; firstEx = -1; firstGreat = -1; firstMisteak = -1; theLifeBar = lifeBar.GetComponent<LifeBar>(); //var bps = thesong.getBPS(actualBPM); //changeBPM -= (float)(bps*thesong.offset)*speedmod; firstUpdate = true; oneSecond = 0f; startTheSong = (float)thesong.offset + DataManager.Instance.globalOffsetSeconds; //bump nextBump = 0; //combo ct = ComboType.FULLFANTASTIC; matProgressBar = progressBarEmpty.renderer.material; matProgressBarFull = progressBar.renderer.material; colorCombo = 1f; comboMisses = 0; alphaCombo = 0.5f; //GUI /*wd = posPercent.width*128; hg = posPercent.height*1024; hgt = posPercent.height*254;*/ //ecart = 92f; displaying = scoreDecoupe(); thetab = comboDecoupe(); //Fail and clear fail = false; clear = false; fullCombo = false; fullExCombo = false; fullFantCombo = false; perfect = false; dead = false; zwip = 0; appearFailok = false; disappearFailok = false; zoomfail = 0f; failalpha = 0f; passalpha = 0f; cacheFailed = true; timeGiveUp = 0f; //Transformation display if(displayValue[4]){ //No judge limitDisplayScore = -1f; } if(displayValue[5]){ //No background RenderSettings.skybox = null; Background.GetComponent<MoveBackground>().enabled = false; Background.SetActiveRecursively(false); } if(displayValue[6]){ //No target arrowLeft.renderer.enabled = false; arrowDown.renderer.enabled = false; arrowUp.renderer.enabled = false; arrowRight.renderer.enabled = false; } //No score : inside the code //No UI if(displayValue[8]){ for(int i=0;i<lifeBar.transform.childCount; i++){ lifeBar.transform.GetChild(i).renderer.enabled = false; } progressBar.renderer.enabled = false; progressBarEmpty.renderer.enabled = false; slow.renderer.enabled = false; fast.renderer.enabled = false; } }
private static void RefreshComboType() { var xCombo = Config.Item("ComboSetOption").GetValue<StringList>().SelectedIndex; switch (xCombo) { case 0: vComboType = Q.Level > W.Level ? ComboType.ComboQR : ComboType.ComboWR; break; case 1: //Q-R vComboType = ComboType.ComboQR; break; case 2: //W-R vComboType = ComboType.ComboWR; break; case 3: //E-R vComboType = ComboType.ComboER; break; } }
public virtual void EndCombo() { m_ComboType = ComboType.None; m_Combo = -1; }
public virtual Spell DoCombo(Mobile c) { Spell spell = null; if (m_ComboType == ComboType.None) m_ComboType = (ComboType)Utility.RandomMinMax(1, 7); if (m_Combo == 1) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: case ComboType.Exp_FB_MA_Poison: case ComboType.Exp_FB_Poison_Light: case ComboType.Exp_FB_MA_Light: case ComboType.Exp_Poison_FB_Light: spell = new ExplosionSpell(m_Mobile, null); break; } } else if (m_Combo == 2) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: spell = new FlameStrikeSpell(m_Mobile, null); break; case ComboType.Exp_MB_Poison: spell = new MindBlastSpell(m_Mobile, null); break; case ComboType.Exp_EB_Poison: spell = new EnergyBoltSpell(m_Mobile, null); break; case ComboType.Exp_FB_MA_Poison: spell = new FireballSpell(m_Mobile, null); break; case ComboType.Exp_FB_Poison_Light: spell = new FireballSpell(m_Mobile, null); break; case ComboType.Exp_FB_MA_Light: spell = new FireballSpell(m_Mobile, null); break; case ComboType.Exp_Poison_FB_Light: spell = new PoisonSpell(m_Mobile, null); break; } } else if (m_Combo == 3) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: spell = new PoisonSpell(m_Mobile, null); EndCombo(); return spell; case ComboType.Exp_FB_MA_Poison: spell = new MagicArrowSpell(m_Mobile, null); break; case ComboType.Exp_FB_Poison_Light: spell = new PoisonSpell(m_Mobile, null); break; case ComboType.Exp_FB_MA_Light: spell = new MagicArrowSpell(m_Mobile, null); break; case ComboType.Exp_Poison_FB_Light: spell = new FireballSpell(m_Mobile, null); break; } } else if (m_Combo == 4) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: spell = new LightningSpell(m_Mobile, null); EndCombo(); return spell; case ComboType.Exp_FB_MA_Poison: spell = new PoisonSpell(m_Mobile, null); break; case ComboType.Exp_FB_Poison_Light: case ComboType.Exp_FB_MA_Light: case ComboType.Exp_Poison_FB_Light: spell = new LightningSpell(m_Mobile, null); EndCombo(); return spell; } } else if (m_Combo == 5) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: case ComboType.Exp_FB_MA_Poison: case ComboType.Exp_FB_Poison_Light: case ComboType.Exp_FB_MA_Light: case ComboType.Exp_Poison_FB_Light: spell = new LightningSpell(m_Mobile, null); EndCombo(); return spell; } } m_Combo++; // Move to next spell if (spell == null) spell = new PoisonSpell(m_Mobile, null); return spell; }
private static void RefreshComboType() { var xCombo = Config.ComboOption; switch (xCombo) { case 0: vComboType = Q.Level > W.Level ? ComboType.ComboQR : ComboType.ComboWR; break; case 1: //Q-R vComboType = ComboType.ComboQR; break; case 2: //W-R vComboType = ComboType.ComboWR; break; case 3: //E-R vComboType = ComboType.ComboER; break; } }
public void SetCombo(ComboType comboStyle) { var teste = MainMenu.Item("koreanzed.combomenu.combostyle") .SetValue<StringList>( new StringList(new string[] { "All Star", "The Line" }) { SelectedIndex = (int)comboStyle }); }