/// <summary> /// Init /// </summary> protected void Init(uint batteryId, uint barrelId, uint bulletId) { this.batteryData = Masters.BatteryDB.FindById(batteryId); this.barrelData = Masters.BarrelDB.FindById(barrelId); this.bulletData = Masters.BulletDB.FindById(bulletId); this.fvAttackData = Masters.FvAttackDB.FindById(this.batteryData.fvAttackId); this.turretBase.batteryKey = this.batteryData.key; this.turretBase.barrelKey = this.barrelData.key; this.turretBase.bulletKey = this.bulletData.key; this.loader.Add<GameObject>(SharkDefine.GetBatteryPrefabPath(this.turretBase.batteryKey)); this.loader.Add<GameObject>(SharkDefine.GetBarrelPrefabPath(this.turretBase.barrelKey)); this.loader.Add<BulletBase>(SharkDefine.GetBulletPrefabPath(this.turretBase.bulletKey)); this.fvaAsset = this.loader.Add<FvAttackBase>(SharkDefine.GetFvAttackPrefabPath((FvAttackType)this.fvAttackData.type)); this.fvaBulletAsset = this.loader.Add<BulletBase>(SharkDefine.GetFvAttackBulletPrefabPath(this.fvAttackData.key)); this.loader.Add<Sprite>(SharkDefine.GetFvAttackTypeIconSpritePath((FvAttackType)this.fvAttackData.type)); this.loader.Add<AudioClip>(SharkDefine.GetSeClipPath(this.barrelData.seName)); this.loader.Add<AudioClip>(SharkDefine.GetSeClipPath(this.bulletData.seName)); string fvAttackSeName = SeName.FvAttackSeName[(int)this.fvAttackData.type]; if (!string.IsNullOrEmpty(fvAttackSeName)) { this.loader.Add<AudioClip>(SharkDefine.GetSeClipPath(fvAttackSeName)); } if (this.fvAttackData.type == (uint)FvAttackType.Penetration) { this.fvaPenetrationChargeEffectAsset = this.loader.Add<GameObject>(SharkDefine.GetFVAChargeEffectPrefabPath(this.fvAttackData.key)); } }