public IEnumerator unloadButtons(skillType type, int dir) { rotating = true; description.SetActive(false); // have them fade out //while alpha >0 var col = 1f; while (col > 0f) { col -= 0.1f; foreach (Button button in type.skillbuttons) { button.GetComponent <Image>().color = new Color(1, 1, 1, col); Debug.Log(button); } yield return(null); } foreach (Button button in type.skillbuttons) { button.gameObject.SetActive(false); } rotateTemple.StartCoroutine(rotateTemple.RotateMe(Vector3.up * 90 * dir, 0.8f, 90 * dir)); }
// ---Constructor--- public Skill(skillType type, string atkName, string description, element atkElement, int mpCost, int range, float start, float end, SpriteAnimation anim, string sfxPath) { // Set main variables this.type = type; this.atkName = atkName; this.description = description; this.atkElement = atkElement; this.mpCost = mpCost; this.range = range; // Set animation variables this.startDist = start; this.endDist = end; this.anim = anim; // Set sfx this.sfxPath = sfxPath; if (sfxPath != "null") { sfx = Resources.Load(sfxPath) as AudioClip; } return; }
public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters) { base.Import(importObject, getters); // res11 and res12 - 0 500 ??? this.type = (skillType)Enum.Parse(typeof(skillType), importObject.reserved[4], true); this.value = Int32.Parse(importObject.reserved[1].Trim()); this.count = Int32.Parse(importObject.reserved[6].Trim()); }
public static skillType Convert(Skill skill) { skillType st = new skillType(); st.name = skill.Name; st.skillValues = new string[skill.Values.Count]; int i = 0; skill.Values.ForEach(sv => { st.skillValues[i++] = sv; }); return(st); }
public skill(string n, skillType t, float s, float d, float cd, float p, int c, string ns) { skillName = n; skillNameShown = ns; type = t; size = s; baseSize = s; duration = d; baseDuration = d; coolDown = cd; baseCoolDown = cd; power = p; basePower = p; active = false; level = 1; cost = c; baseCost = c; cooling = false; currentCool = 0; }
public IEnumerator loadButtons(skillType type) { //start coroutine for them and have them fade in foreach (Button button in type.skillbuttons) { button.gameObject.SetActive(true); } // Debug.Log("f**k my life"); var col = 0f; while (col < 1f) { col += 0.15f; foreach (Button button in type.skillbuttons) { button.GetComponent <Image>().color = new Color(1, 1, 1, col); } yield return(null); } rotateTemple.counterReset(); rotating = false; }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); // res11 and res12 - 0 500 ??? this.type = (skillType)Enum.Parse(typeof(skillType), importObject.reserved[4], true); this.value = Int32.Parse(importObject.reserved[1].Trim()); this.count = Int32.Parse(importObject.reserved[6].Trim()); }