public void SetWeaponType(WeaponType weaponType) { this.weaponType = weaponType; switch (weaponType) { default: case WeaponType.Pistol: EnableAimSkeleton(); characterAimBase.SetWeaponType(CharacterAim_Base.WeaponType.Pistol); break; case WeaponType.Shotgun: EnableAimSkeleton(); characterAimBase.SetWeaponType(CharacterAim_Base.WeaponType.Shotgun); break; case WeaponType.Punch: EnableNormalSkeleton(); playerPunch.enabled = true; playerSword.enabled = false; break; case WeaponType.Sword: EnableNormalSkeleton(); playerPunch.enabled = false; playerSword.enabled = true; break; } }
private void Start() { characterBase.SetWeaponType(CharacterAim_Base.WeaponType.Pistol); enemyMain.OnDestroySelf += EnemyMain_OnDestroySelf; enemyMain.HealthSystem.SetHealthMax(100, true); }