public override void Do() { base.Do(); int num1 = 0; string[] args1 = this.args; int index1 = num1; int num2 = index1 + 1; int num3 = int.Parse(args1[index1]); string[] args2 = this.args; int index2 = num2; int num4 = index2 + 1; bool bareFoot = bool.Parse(args2[index2]); string[] args3 = this.args; int index3 = num4; int num5 = index3 + 1; AIProject.Definitions.Map.FootStepSE seType = (AIProject.Definitions.Map.FootStepSE)PlayFootStepSE.Get <AIProject.Definitions.Map.FootStepSE>(args3[index3]); string[] args4 = this.args; int index4 = num5; int num6 = index4 + 1; Weather weather = (Weather)PlayFootStepSE.Get <Weather>(args4[index4]); string[] args5 = this.args; int index5 = num6; int num7 = index5 + 1; SoundPack.PlayAreaType areaType = (SoundPack.PlayAreaType)PlayFootStepSE.Get <SoundPack.PlayAreaType>(args5[index5]); string posStr = string.Empty; string[] args6 = this.args; int index6 = num7; int num8 = index6 + 1; System.Action <string> act = (System.Action <string>)(s => posStr = s); args6.SafeProc(index6, act); AudioSource audioSource = Singleton <Resources> .Instance.SoundPack.PlayFootStep((byte)num3, bareFoot, seType, weather, areaType); if (!Object.op_Inequality((Object)audioSource, (Object)null)) { return; } Vector3 vector3; if (this.scenario.commandController.V3Dic.TryGetValue(posStr, out vector3)) { ((Component)audioSource).get_transform().set_position(vector3); } else { if (!Object.op_Inequality((Object)this.scenario.AdvCamera, (Object)null)) { return; } ((Component)audioSource).get_transform().set_position(((Component)this.scenario.AdvCamera).get_transform().get_position()); } }
public AudioSource PlayFootStep( byte sex, bool bareFoot, AIProject.Definitions.Map.FootStepSE seType, Weather weather, SoundPack.PlayAreaType areaType) { if (sex != (byte)0 && sex != (byte)1) { return((AudioSource)null); } List <int> source = (List <int>)null; if (areaType == SoundPack.PlayAreaType.Normal && source.IsNullOrEmpty <int>() && (weather == Weather.Rain || weather == Weather.Storm)) { if (!(sex != (byte)0 ? this._femaleRainFootStepSEMeshTable : this._maleRainFootStepSEMeshTable).TryGetValue(seType, out source)) { source = (List <int>)null; } else if (source.IsNullOrEmpty <int>()) { return((AudioSource)null); } } if (bareFoot && source.IsNullOrEmpty <int>()) { if (!(sex != (byte)0 ? this._femaleBareFootStepSEMeshTable : this._maleBareFootStepSEMeshTable).TryGetValue(seType, out source)) { source = (List <int>)null; } else if (source.IsNullOrEmpty <int>()) { return((AudioSource)null); } } if (source.IsNullOrEmpty <int>()) { if (!(sex != (byte)0 ? this._femaleFootStepSEMeshTable : this._maleFootStepSEMeshTable).TryGetValue(seType, out source)) { return((AudioSource)null); } if (source.IsNullOrEmpty <int>()) { return((AudioSource)null); } } if (source.IsNullOrEmpty <int>()) { return((AudioSource)null); } int key = source[Random.Range(0, source.Count)]; SoundPack.Data2D data2D; return(!(sex != (byte)0 ? this._femaleFootStepSEData : this._maleFootStepSEData).TryGetValue(key, out data2D) ? (AudioSource)null : this.Play((SoundPack.IData)data2D, Manager.Sound.Type.GameSE3D, 0.0f)); }