mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-22 16:21: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
|
||||
{
|
||||
1 => ParticleEffects[description.EffectIndex],
|
||||
2 => MetaParticleEffects[description.EffectIndex],
|
||||
6 => SequenceEffects[description.EffectIndex],
|
||||
10 => ModelEffects[description.EffectIndex],
|
||||
_ => throw new NotImplementedException(
|
||||
$"Block type {description.EffectType} in VisualEffect not supported")
|
||||
};
|
||||
|
|
|
@ -17,5 +17,6 @@ public class EffectsTest : MonoBehaviour
|
|||
|
||||
var effectsManager = GetComponent<EffectsManager>();
|
||||
effectsManager.StartEffect("neighborhood_house_smoking");
|
||||
//effectsManager.StartEffect("neighborhood_hanggliders");
|
||||
}
|
||||
}
|
|
@ -62,6 +62,17 @@ namespace OpenTS2.Scenes
|
|||
var subSystem = CreateForParticleEffect(effectDescription, e);
|
||||
subSystem.transform.SetParent(unityParticleSystem.transform, worldPositionStays: false);
|
||||
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:
|
||||
throw new NotImplementedException($"Effect type {effect} not supported");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue