private void OnCollisionEnter2D(Collision2D collision) { if (IsGround) { return; } else { IsGround = true; float positionX = gameObject.transform.position.x; int num = 3 * (int)Mathf.Pow(2.0f, ChainNum - 1); Blinding broken = Instantiate(Broken, new Vector3(positionX, 1.13f, 0f), Quaternion.identity); broken.transform.parent = GameManager.instance.EffectHolder.transform; broken.Damage = Damage; broken.num = num; broken.LoseRate = LoseRate; SoundManager.instance.GlassBroken.Play(); // 연기 사라지는거 수동으로 시간 맞춰놓음 Destroy(broken.gameObject, 4.4f); Destroy(gameObject); } }
void Start() { animations = GetComponent <Animator>(); spriteController = GetComponent <SpriteRenderer>(); // initiates stats TotalHp = baseHp; TotalAttack = baseAttack; CurrentHp = TotalHp; EnableMovement = true; EnableAttack = true; // initial positioning spawnPoint = GameObject.Find("GladiatorSpawn").transform; transform.position = new Vector2(spawnPoint.position.x, spawnPoint.position.y); position = transform.position; newPosition = position; // creates all the skills slashSkill = new Slash(slashButton, slash); whirlingSkill = new Whirling(whirlingButton, whirling); sonicSkill = new Sonic(sonicButton, sonic); defendSkill = new Defend(defendButton, defend); blindingSkill = new Blinding(blindingButton, blinding); }
public void Default() { // Arrange var enchantment = new Blinding(); // Assert Assert.AreEqual("Blinding", enchantment.Name.Text); Assert.AreEqual(1, enchantment.SpecialAbilityBonus); Assert.AreEqual(7, enchantment.CasterLevel); Assert.That(enchantment.GetSchools(), Has.Exactly(1).Matches <School>(s => School.Evocation == s)); }