mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-23 00:31:47 -05:00
Add code to start rendering meta particle and models
This commit is contained in:
parent
3ca271f7ec
commit
4bf9ceba85
3 changed files with 14 additions and 0 deletions
|
@ -75,7 +75,9 @@ namespace OpenTS2.Content.DBPF
|
||||||
return description.EffectType switch
|
return description.EffectType switch
|
||||||
{
|
{
|
||||||
1 => ParticleEffects[description.EffectIndex],
|
1 => ParticleEffects[description.EffectIndex],
|
||||||
|
2 => MetaParticleEffects[description.EffectIndex],
|
||||||
6 => SequenceEffects[description.EffectIndex],
|
6 => SequenceEffects[description.EffectIndex],
|
||||||
|
10 => ModelEffects[description.EffectIndex],
|
||||||
_ => throw new NotImplementedException(
|
_ => throw new NotImplementedException(
|
||||||
$"Block type {description.EffectType} in VisualEffect not supported")
|
$"Block type {description.EffectType} in VisualEffect not supported")
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,5 +17,6 @@ public class EffectsTest : MonoBehaviour
|
||||||
|
|
||||||
var effectsManager = GetComponent<EffectsManager>();
|
var effectsManager = GetComponent<EffectsManager>();
|
||||||
effectsManager.StartEffect("neighborhood_house_smoking");
|
effectsManager.StartEffect("neighborhood_house_smoking");
|
||||||
|
//effectsManager.StartEffect("neighborhood_hanggliders");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -62,6 +62,17 @@ namespace OpenTS2.Scenes
|
||||||
var subSystem = CreateForParticleEffect(effectDescription, e);
|
var subSystem = CreateForParticleEffect(effectDescription, e);
|
||||||
subSystem.transform.SetParent(unityParticleSystem.transform, worldPositionStays: false);
|
subSystem.transform.SetParent(unityParticleSystem.transform, worldPositionStays: false);
|
||||||
break;
|
break;
|
||||||
|
case MetaParticle e:
|
||||||
|
// TODO: apply adjustments from meta particle on the base particle effect.
|
||||||
|
StartEffect(e.BaseEffect);
|
||||||
|
break;
|
||||||
|
case ModelEffect e:
|
||||||
|
Debug.Log($"modeleffect mode name: {e.ModelName}");
|
||||||
|
var model = ContentProvider.Get()
|
||||||
|
.GetAsset<ScenegraphResourceAsset>(new ResourceKey(e.ModelName, GroupIDs.Scenegraph,
|
||||||
|
TypeIDs.SCENEGRAPH_CRES));
|
||||||
|
model.CreateRootGameObject();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException($"Effect type {effect} not supported");
|
throw new NotImplementedException($"Effect type {effect} not supported");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue