76 lines
1.8 KiB
C#
76 lines
1.8 KiB
C#
//This code create by CodeEngine ,don't modify
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections;
|
|
using Module.Log;
|
|
|
|
namespace GCGame.Table
|
|
{
|
|
|
|
public class Tab_Sounds{
|
|
|
|
public const string TAB_FILE_DATA = "Sounds";
|
|
private const int _varCount = 10;
|
|
|
|
public int GetId()
|
|
{
|
|
return Id;
|
|
}
|
|
|
|
public static bool Validate(string line)
|
|
{
|
|
var segments = 0;
|
|
foreach (char c in line)
|
|
if (c == '\t')
|
|
segments++;
|
|
// Note: skip the 2nd column as it's the description;
|
|
var result = segments == _varCount;
|
|
if (!result)
|
|
LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments));
|
|
return result;
|
|
}
|
|
|
|
public Tab_Sounds()
|
|
{
|
|
}
|
|
|
|
public Tab_Sounds(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
FullPathName = segments[2].Trim();
|
|
PanLevel = float.Parse(segments[3]);
|
|
Volume = float.Parse(segments[4]);
|
|
MinDistance = float.Parse(segments[5]);
|
|
Spread = float.Parse(segments[6]);
|
|
IsLoop = int.Parse(segments[7]) > 0;
|
|
FadeInTime = float.Parse(segments[8]);
|
|
FadeOutTime = float.Parse(segments[9]);
|
|
Priority = short.Parse(segments[10]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public string FullPathName { get; private set; }
|
|
|
|
public float PanLevel { get; private set; }
|
|
|
|
public float Volume { get; private set; }
|
|
|
|
public float MinDistance { get; private set; }
|
|
|
|
public float Spread { get; private set; }
|
|
|
|
public bool IsLoop { get; private set; }
|
|
|
|
public float FadeInTime { get; private set; }
|
|
|
|
public float FadeOutTime { get; private set; }
|
|
|
|
public short Priority { get; private set; }
|
|
|
|
|
|
}
|
|
} |