protected Hero(HeroInfo heroInfo) { maxHp = heroInfo.Hp; currentHp = maxHp; if (HpChangedEvent != null) { HpChangedEvent(this, currentHp, maxHp); } maxAmmo = heroInfo.Ammo; currentAmmo = maxAmmo; if (AmmoChangedEvent != null) { AmmoChangedEvent(this, currentAmmo, maxAmmo); } bullets = new BulletInfo[maxAmmo]; bulletSprite = heroInfo.BulletSprite; bulletSpeed = heroInfo.BulletSpeed; animator = heroInfo.Animator; hand = new HandController(heroInfo); bodyParts = HitBox.GetHitBox(heroInfo.HitBox); }