public async Task <IActionResult> Edit(int id, [Bind("skillsId,descricao_skills")] skills skills) { if (id != skills.skillsId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(skills); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!skillsExists(skills.skillsId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(skills)); }
void Useskills() { if (Target) { do { NewSkill = (skills)Random.Range(0, (int)(skills.END)); } while (NewSkill == LastSkill); switch (NewSkill) { case skills.BlackfathomHamstring: BlackfathomHamstring(); break; case skills.Bash: Bash(); break; case skills.MyrmidonSlash: MyrmidonSlash(); break; case skills.VengefulStance: VengefulStance(); break; default: break; } } }
public async Task <IActionResult> Edit(int id, [Bind("ID,skillName,experienceLevel,yearsUsed,applicantID")] skills skills) { if (id != skills.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(skills); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!skillsExists(skills.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["applicantID"] = new SelectList(_context.applicant, "ID", "ID", skills.applicantID); return(View(skills)); }
public member(string name, int leader, int fight, int dex, int unlock, int knowledge) { skill = new skills(); this.name = name; this.skill.leader = leader; this.skill.fight = fight; this.skill.dex = dex; this.skill.unlock = unlock; this.skill.knowledge = knowledge; }
public async Task <IActionResult> Create([Bind("skillsId,descricao_skills")] skills skills) { if (ModelState.IsValid) { _context.Add(skills); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(skills)); }
public SaveData(Stats stats) { highScore = stats.highScore; totalTimeSpent = stats.totalTimeSpent; numberOfGames = stats.numberOfGames; gold = stats.gold; unlockedSkills = stats.unlockedSkills.ToList(); leftSkill = stats.leftSkill; rightSkill = stats.rightSkill; }
private Vector2 pov; // private to avoid clashing with playerTest.cs #endregion void Awake() { rb = GetComponent<Rigidbody2D>(); anim = GetComponent<Animator>(); cont = GetComponent<SceneController>(); equippedWeapon = gameObject.GetComponent<dagger>(); cam = Camera.main; HP = maxHP; // healthBar.maxValue = maxHP; // healthBar.value = maxHP; }
public async Task <IActionResult> Create([Bind("ID,skillName,experienceLevel,yearsUsed,applicantID")] skills skills) { if (ModelState.IsValid) { _context.Add(skills); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(skills)); }
public void SetSkills() { if (CompareTag("Left")) { skill = SkillsManager.Instance.skillLeft; GetComponent <Image>().sprite = SkillsManager.Instance.imageTable[(int)skill]; } if (CompareTag("Right")) { skill = SkillsManager.Instance.skillRight; GetComponent <Image>().sprite = SkillsManager.Instance.imageTable[(int)skill]; } }
void Update() { dir.x = Input.GetAxisRaw("Horizontal"); dir.y = Input.GetAxisRaw("Vertical"); mousePos = cam.ScreenToWorldPoint(Input.mousePosition); face(); #region weaponSwitch if (Input.GetKeyDown(KeyCode.Alpha1)) { equippedWeapon = gameObject.GetComponent<dagger>(); Debug.Log("Equipped Daggers."); } if (Input.GetKeyDown(KeyCode.Alpha2)) { equippedWeapon = gameObject.GetComponent<halberd>(); Debug.Log("Equipped Halberd."); } if (Input.GetKeyDown(KeyCode.Alpha3)) { equippedWeapon = gameObject.GetComponent<bow>(); Debug.Log("Equipped Bow."); } #endregion #region weaponAttack if (Input.GetButtonDown("Fire1")) { equippedWeapon.basicAttack(); } if (Input.GetButtonDown("Fire2")) { } if (Input.GetKeyDown(KeyCode.Space)) { } #endregion if (Input.GetKeyDown(KeyCode.LeftShift)) { rb.MovePosition(rb.position + dir * moveSpeed * 2); } }
private void Start() { skillLeft = GameManager.StatsManager.stats.leftSkill; skillRight = GameManager.StatsManager.stats.rightSkill; unlockedSkills = GameManager.StatsManager.stats.unlockedSkills.ToList(); for (int i = 0; i < skillImages.Count; i++) { imageTable.Add(i, skillImages[i]); } SetSkills(); }
void SelectAttackOne() { if (usesskills == skills.flyToPointFire) { usesskills = (skills)Random.Range(0, 1); if (usesskills == skills.flyToPointFire) { int numposin = ((int)mypoint + Random.Range(1, 2)) % 3; mypoint = (point)numposin; if (mypoint == point.left) { status = statusBoss.FlyMoveFireL; } if (mypoint == point.right) { status = statusBoss.FlyMoveFireR; } if (mypoint == point.сentre) { status = statusBoss.FlyStopFireC; } } else { status = statusBoss.FlyMoveFireL; } } else { usesskills = skills.flyToPointFire; mypoint = (point)Random.Range(0, 3); if (mypoint == point.left) { status = statusBoss.FlyMoveFireL; } if (mypoint == point.right) { status = statusBoss.FlyMoveFireR; } if (mypoint == point.сentre) { status = statusBoss.FlyMoveFireC; } } Debug.Log(status + " " + usesskills); }
void Awake() { UI = GameObject.Find("UI(Clone)"); UI.transform.SetParent(transform); dagger = gameObject.GetComponent <dagger>(); halberd = gameObject.GetComponent <halberd>(); bow = gameObject.GetComponent <bow>(); currencyText = GameObject.Find("Currency").GetComponent <Text>(); rb = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); cont = GetComponent <SceneController>(); equippedWeapon = gameObject.GetComponent <dagger>(); cam = Camera.main; storeCont = gameObject.GetComponent <StoreController>(); HP = maxHP; renderhealth(); }
void SelectAttackTwo() { if (usesskills == skills.DownFire) { float rand = Random.Range(0, 1); if (rand >= 0.5) { status = statusBoss.DownSkillOne; } else { status = statusBoss.DownSkillTwo; } } if (usesskills == skills.flyAndFireRL || usesskills == skills.flyToPointFire) { usesskills = skills.DownFire; status = statusBoss.DownMoveC; mypoint = point.сentre; } }
public void LoadHud() { if (!PlayerGo) { return; } Player = PlayerGo.GetComponent <player>(); if (!Player) { return; } Skills = PlayerGo.GetComponent <skills>(); if (!Skills) { return; } Stats = PlayerGo.GetComponent <stats>(); if (!Stats) { return; } Inventory = PlayerGo.GetComponent <inventory>(); if (!Inventory) { return; } Inventory.hud = this; Stats.hud = this; Stats.getStats(); foreach (Hud_Skillbar _hud_Skillbar in GetComponentsInChildren <Hud_Skillbar>(true)) { _hud_Skillbar.LoadSkillBar(); } foreach (Hud_Subskill _hud_subSkillbar in GetComponentsInChildren <Hud_Subskill>(true)) { _hud_subSkillbar.LoadSubSkillValues(); } hud_Inventory.LoadHudInventory(Inventory); }
public SaveSkillsData(Skills skill) { Name = skill.Name; Amount = skill.Amount; }
void Update() { if (currScene == "Shop") { UI.transform.SetParent(null); } else { UI.transform.SetParent(transform); UI.transform.position = new Vector3(transform.position.x + offset.x, transform.position.y + offset.y, transform.position.z); } if (!dying) { rb.bodyType = RigidbodyType2D.Dynamic; if (cam == null) { if (currScene == "Shop") { storeCont.storeDisplay(); } cam = Camera.main; } if (UI.GetComponent <Canvas>().worldCamera == null) { UI.GetComponent <Canvas>().worldCamera = Camera.main; } dir.x = Input.GetAxisRaw("Horizontal"); dir.y = Input.GetAxisRaw("Vertical"); mousePos = cam.ScreenToWorldPoint(Input.mousePosition); face(); walk(); #region weaponSwitch if (Input.GetKeyDown(KeyCode.Alpha1)) { equippedWeapon = gameObject.GetComponent <dagger>(); Debug.Log("Equipped Daggers."); dagger.equipped = true; halberd.equipped = false; bow.equipped = false; } if (Input.GetKeyDown(KeyCode.Alpha2)) { equippedWeapon = gameObject.GetComponent <halberd>(); Debug.Log("Equipped Halberd."); dagger.equipped = false; halberd.equipped = true; bow.equipped = false; } if (Input.GetKeyDown(KeyCode.Alpha3)) { equippedWeapon = gameObject.GetComponent <bow>(); Debug.Log("Equipped Bow."); dagger.equipped = false; halberd.equipped = false; bow.equipped = true; } #endregion #region weaponAttacks if (Input.GetButtonDown("Fire1")) { //int sound_determiner = Random.Range(0, 9); //if (sound_determiner <= 4) //{ //SoundManagerScript.PlaySound("ATK1"); //} else //{ // SoundManagerScript.PlaySound("ATK2"); //} if (equippedWeapon.Equals(dagger)) { //StartCoroutine(jab()); equippedWeapon.basicAttack(); } else if (equippedWeapon.Equals(halberd)) { equippedWeapon.basicAttack(); } equippedWeapon.basicAttack(); } if (Input.GetButtonDown("Fire2")) { //SoundManagerScript.PlaySound("Skill"); if (equippedWeapon.Equals(halberd)) { } equippedWeapon.ability(); } if (Input.GetKeyDown(KeyCode.Space)) { //SoundManagerScript.PlaySound("Skill"); if (equippedWeapon.Equals(halberd)) { } equippedWeapon.ultimate(); } #endregion if (Input.GetKeyDown(KeyCode.LeftShift)) { } if (Input.GetKeyDown(KeyCode.N)) { die(); } } else { rb.bodyType = RigidbodyType2D.Static; } }
public static void Initialize(ResumeContext context) { context.Database.EnsureCreated(); // Look for any applicants if (!context.applicant.Any()) { var applicants = new applicant[] { new applicant { FirstName = "Carson", LastName = "Alexander", City = "ABQ", State = "NM", Phone = "505-933-9799", Email = "*****@*****.**", WebAddress = "kellycockrell.net" } // new applicant {FirstName="Johnson",LastName="Joan",City="ABQ", State="NM", Phone="505-933-9799", Email="*****@*****.**", WebAddress="kellycockrell.net"}, // new applicant {FirstName="Raphael",LastName="Lobato",City="ABQ", State="NM", Phone="505-933-9799", Email="*****@*****.**", WebAddress="kellycockrell.net"}, // new applicant {FirstName="Elsa",LastName="Castillo",City="ABQ", State="NM", Phone="505-933-9799", Email="*****@*****.**", WebAddress="kellycockrell.net"}, // new applicant {FirstName="Cassiano",LastName="de Oliveira",City="ABQ", State="NM", Phone="505-933-9799", Email="*****@*****.**", WebAddress="kellycockrell.net"}, // new applicant {FirstName="Brendaleigh",LastName="Lobato",City="ABQ", State="NM", Phone="505-933-9799", Email="*****@*****.**", WebAddress="kellycockrell.net"}, }; foreach (applicant a in applicants) { context.applicant.Add(a); } context.SaveChanges(); } if (!context.education.Any()) { var education = new education[] { new education { degreeType = "Bachelors", subject = "Fine Arts", institution = "University of New Mexico", city = "Albuquerque", state = "NM", gradDate = "May 1994", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new education { degreeType = "Bachelors", subject = "Electrical Engineering", institution = "University of Texas", city = "Austin", state = "NM", gradDate = "May 1994", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new education { degreeType = "Masters", subject = "Physics", institution = "Boston College", city = "Boston", state = "MA", gradDate = "May 2016", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, //new education {degreeType = "PhD", subject = "Sociology", institution = "Harvard University", city = "Cambridge", state = "MA", gradDate = "December 2010",applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, //new education {degreeType = "PhD", subject = "Nuclear Engineering", institution = "Imperial College", city = "London", state = "UK", gradDate = "May 1989",applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, //new education {degreeType = "Associates", subject = "Business Administration", institution = "Santa Fe Community College", city = "Santa Fe", state = "NM", gradDate = "May 2018",applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, //new education {degreeType = "Bachelors", subject = "Biology", institution = "University of Colorado", city = "Boulder", state = "CO", gradDate = "December 1994",applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID } }; foreach (education e in education) { context.education.Add(e); } context.SaveChanges(); } if (!context.references.Any()) { var references = new references[] { new references { firstName = "Barack", lastName = "Obama", companyName = "Former President of the United States", mailingAddress = "P.O. Box 91000", city = "Washington DC", state = "", emailAddress = "*****@*****.**", phone = "212-444-5555", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new references { firstName = "Vladimir", lastName = "Putin", companyName = "President and DIctator of Russia", mailingAddress = "P.O. Box 666661", city = "Moscow", state = "Russia", emailAddress = "*****@*****.**", phone = "33-433-4424-09090", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new references { firstName = "Barack", lastName = "Obama", companyName = "Former President of the United States", mailingAddress = "P.O. Box 91000", city = "Washington DC", state = "", emailAddress = "*****@*****.**", phone = "212-444-5555", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, //new references {firstName= "Barack", lastName = "Obama", companyName = "Former President of the United States", mailingAddress = "P.O. Box 91000", city="Washington DC", state="", emailAddress= "*****@*****.**", phone = "212-444-5555" }, //new references {firstName= "Barack", lastName = "Obama", companyName = "Former President of the United States", mailingAddress = "P.O. Box 91000", city="Washington DC", state="", emailAddress= "*****@*****.**", phone = "212-444-5555" }, //new references {firstName= "Barack", lastName = "Obama", companyName = "Former President of the United States", mailingAddress = "P.O. Box 91000", city="Washington DC", state="", emailAddress= "*****@*****.**", phone = "212-444-5555" } }; foreach (references r in references) { context.references.Add(r); } context.SaveChanges(); } if (!context.skills.Any()) { var skills = new skills[] { new skills { skillName = "Javascript", experienceLevel = "Advanced", yearsUsed = "3", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new skills { skillName = "Adobe Photoshop", experienceLevel = "Expert", yearsUsed = "10", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new skills { skillName = "Adobe Illustrator", experienceLevel = "Advanced", yearsUsed = "8", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new skills { skillName = "C#", experienceLevel = "Novice", yearsUsed = "1", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new skills { skillName = "HTML/CSS", experienceLevel = "Expert", yearsUsed = "10", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new skills { skillName = "Microsoft Office", experienceLevel = "Advanced", yearsUsed = "20", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID } }; foreach (skills s in skills) { context.skills.Add(s); } context.SaveChanges(); } if (!context.experience.Any()) { var experience = new Experience[] { new Experience { jobName = "Internship Coordinator and Graphic Designer", placeWorked = "University of New Mexico", city = "Albuquerque", state = "NM", startDate = "June 2015", endDate = "present", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new Experience { jobName = "Teacher of Computer Science and Technology", placeWorked = "The Meadows School", city = "Las Vegas", state = "NV", startDate = "August 2013", endDate = "June 2015", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new Experience { jobName = "Director of Technology", placeWorked = "Steamboat Mountain School", city = "Steamboat Springs", state = "CO", startDate = "June 2012", endDate = "July 2013", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new Experience { jobName = "Technology Lab Coordinator", placeWorked = "Rowland Hall-St. Mark's School", city = "Salt Lake City", state = "UT", startDate = "August 2007", endDate = "June 2012", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new Experience { jobName = "Web and UX Designer", placeWorked = "University of Arkansas", city = "Fayetteville", state = "AR", startDate = "November 2006", endDate = "August 2007", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID }, new Experience { jobName = "Marketing Advertising Executive", placeWorked = "Lovely County Citizen", city = "Eureka Springs", state = "AR", startDate = "Jan 2005", endDate = "October 2006", applicantID = context.applicant.FirstOrDefault(y => y.FirstName == "Carson").ID } }; foreach (Experience e in experience) { context.experience.Add(e); } context.SaveChanges(); } if (!context.duties.Any()) { var duty = new duties[] { new duties { summary = "• Coordinates mentoring and internship program under a grant from the National Science Foundation.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "University of New Mexico").ID }, new duties { summary = "• Organizes and expedites mentoring events and meetings with faculty and students.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "University of New Mexico").ID }, new duties { summary = "• Advises and mentors students in meaningful development of careers. ", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "University of New Mexico").ID }, new duties { summary = "• Conceptualizes and designs advertising campaigns for School of Engineering.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "The Meadows School").ID }, new duties { summary = "• Photographs students, faculty, and departmental events, to be used for publication", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "The Meadows School").ID }, new duties { summary = "• Conceptualized, designed, and taught computer science and technology curriculum to students in a project-based environment at rigorous private middle school.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "The Meadows School").ID }, new duties { summary = "• Oversaw entire technology department for an independent boarding school,grades 9-12.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "Steamboat Mountain School").ID }, new duties { summary = "• Configured and administered firewall, wireless network, and Active Directory Server.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "Steamboat Mountain School").ID }, new duties { summary = "• Oversaw budget, recommended to and consulted with Head of School or purchases.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "Steamboat Mountain School").ID }, new duties { summary = "• Taught graphic design; advised and supervised students in the creation of theschool yearbook.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "Rowland Hall-St. Mark's School").ID }, new duties { summary = "• Managed the scheduling, maintenance, and security of computer labs.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "Rowland Hall-St. Mark's School").ID }, new duties { summary = "• Recommended hardware, software and learning resources to teachers.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "Rowland Hall-St. Mark's School").ID }, new duties { summary = "• First responder for end - user and technical support to faculty and students.", experienceID = context.experience.FirstOrDefault(y => y.placeWorked == "Rowland Hall-St. Mark's School").ID } }; foreach (duties d in duty) { context.duties.Add(d); } context.SaveChanges(); } }
// Update is called once per frame void Update() { if (hp <= 0) { Destroy(gameObject, 0); } if (target != null) { if (reload > 0) { reload--; } if (timeToNextfire > 0) { timeToNextfire--; } if (timeToNextfire <= 0) { if (activAttack == skills.first && numberAttack < 3) { FireAngleType(bullets[0], 0, 20, 360); timeToNextfire = 150; numberAttack++; } if (activAttack == skills.second && numberAttack < 2) { FireAngleType(bullets[0], 270, 30, 180); timeToNextfire = 150; numberAttack++; } if (activAttack == skills.third && numberAttack < 10) { FireAngleType(bullets[0], 270 + numberAttack * 18, 10, 30); timeToNextfire = 10; numberAttack++; } if (activAttack == skills.fourth && numberAttack < 5) { FireAngleType(bullets[0], 290 - 18 + numberAttack * 18, 5, 30); FireAngleType(bullets[0], 80 - 18 - numberAttack * 18, 5, 30); timeToNextfire = 20; numberAttack++; } if (activAttack == skills.fifth && numberAttack < 5) { FireAngleType(bullets[0], 360 - 18 + numberAttack * 18, 5, 30); FireAngleType(bullets[0], 360 - 18 - numberAttack * 18, 5, 30); timeToNextfire = 20; numberAttack++; } } if (reload <= 0) { int w = Random.Range(0, 5); if (w == 0) { activAttack = skills.first; numberAttack = 0; } if (w == 1) { activAttack = skills.second; numberAttack = 0; } if (w == 2) { activAttack = skills.third; numberAttack = 0; } if (w == 3) { activAttack = skills.fourth; numberAttack = 0; } if (w == 4) { activAttack = skills.fifth; numberAttack = 0; } reload = 3600 / speedfire; } } }