private void Awake() { if (!(weaponData is GunInfo)) { defInfo = new GunInfo(weaponName, 500); weaponData = defInfo; } else { throw new Exception("WeaponInfo is not the type of GunInfo."); } WeaponSkill = new WeaponSkillDetail.Builder(SkillType.WpNone, 0).Build(); if (soundFxAtk == null || soundFxAtk.Equals("")) { soundFxAtk = "rifle_shoot"; } }
public override void Awake() { weaponType = WeaponType.Gun; if (weaponData == null) { weaponData = new GunInfo(weaponName, 10000, 25, 5); } else { throw new Exception("WeaponInfo is not the type of GunInfo."); } WeaponSkill = new WeaponSkillDetail.Builder(SkillType.WpBurst, 0).SetColdDownTime(0).Build(); if (soundFxAtk == null || soundFxAtk.Equals("")) { soundFxAtk = "shot_gun_shoot"; } base.Awake(); }
/// <summary> /// 初始化武器 /// </summary> public override void Awake() { weaponType = WeaponType.Gun; if (!(weaponData is GunInfo)) { weaponData = new GunInfo(weaponName, 100); } else { throw new Exception("WeaponInfo is not the type of GunInfo."); } WeaponSkill = new WeaponSkillDetail.Builder(SkillType.WpNone, 0).Build(); if (soundFxAtk == null || soundFxAtk.Equals("")) { soundFxAtk = "rifle_shoot"; } base.Awake(); }