mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-09-20 06:11:54 +00:00
anim group can be loaded from stream reader
This commit is contained in:
parent
54f976de22
commit
814cb38cc9
2 changed files with 23 additions and 16 deletions
|
@ -263,26 +263,33 @@ namespace SanAndreasUnity.Importing.Animation
|
|||
{ get { return _sGroups; } }
|
||||
|
||||
|
||||
public static void Load(string path)
|
||||
public static void Load(string path)
|
||||
{
|
||||
using (var reader = File.OpenText(path))
|
||||
{
|
||||
LoadFromStreamReader(reader);
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadFromStreamReader(StreamReader reader)
|
||||
{
|
||||
using (var reader = File.OpenText(path))
|
||||
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
var match = _sHeaderRegex.Match(line);
|
||||
if (!match.Success) continue;
|
||||
|
||||
var group = new AnimationGroup(match, reader);
|
||||
|
||||
if (!_sGroups.ContainsKey(group.Name))
|
||||
{
|
||||
var match = _sHeaderRegex.Match(line);
|
||||
if (!match.Success) continue;
|
||||
|
||||
var group = new AnimationGroup(match, reader);
|
||||
|
||||
if (!_sGroups.ContainsKey(group.Name))
|
||||
{
|
||||
_sGroups.Add(group.Name, new Dictionary<AnimGroup, AnimationGroup>());
|
||||
}
|
||||
|
||||
_sGroups[group.Name].Add(group.Type, group);
|
||||
_sGroups.Add(group.Name, new Dictionary<AnimGroup, AnimationGroup>());
|
||||
}
|
||||
|
||||
_sGroups[group.Name].Add(group.Type, group);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static AnimationGroup GetInternal(string name, AnimGroup type)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
- Chat
|
||||
|
||||
- Android: touch input is required ; set default fps to 25 ; add some predefined folders in file browser ; HUD must run before other UI scripts ;
|
||||
- Android: touch input is required ; set default fps to 25 ; add some predefined folders in file browser ; HUD must run before other UI scripts ; load config from resources ;
|
||||
|
||||
- Play sounds: horn ; empty weapon slot ; ped damage ; footsteps in run and sprint states ;
|
||||
|
||||
|
|
Loading…
Reference in a new issue