| | |
| | | public int gotoType = 0;
|
| | |
|
| | | public int autoHammerLevel { get; set; }
|
| | |
|
| | | public int hammerAudioId { get; private set; }
|
| | | public int audioLength { get; private set; }
|
| | | void ParseConfig()
|
| | | {
|
| | | godWeaponTypes = GodWeaponConfig.GetGodWeaponType();
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | funcConfig = Config.Instance.Get<FuncConfigConfig>("Godvideo");
|
| | | hammerAudioId = int.Parse(funcConfig.Numerical1);
|
| | | audioLength = int.Parse(funcConfig.Numerical2);
|
| | | }
|
| | |
|
| | | public int[] GetLevelUpItemByType(int type)
|
| | |
| | | pak.ItemCount = 1;
|
| | | pak.IsAutoBuy = 0;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | PlayHammerAudio();
|
| | | }
|
| | |
|
| | | DateTime lastAudioTime = DateTime.Now;
|
| | | public void PlayHammerAudio()
|
| | | {
|
| | | var seconds = (float)audioLength / 1000;
|
| | | if ((DateTime.Now - lastAudioTime).TotalSeconds < seconds)
|
| | | {
|
| | | return;
|
| | | }
|
| | | lastAudioTime = DateTime.Now;
|
| | | SoundPlayer.Instance.PlayUIAudio(hammerAudioId);
|
| | | }
|
| | |
|
| | | public event Action godWeaponUpdate;
|