public static async System.Threading.Tasks.Task <GamePlay.Actor.GActor> CreateParticleActor2( [Editor.Editor_RNameType(Editor.Editor_RNameTypeAttribute.Mesh)] RName gmsName, [Editor.Editor_RNameMacrossType(typeof(EngineNS.Bricks.Particle.McParticleEffector))] RName macross, bool IdentityDrawTransform) { var rc = CEngine.Instance.RenderContext; // ParticleActor var actor = new GamePlay.Actor.GActor(); actor.ActorId = Guid.NewGuid(); var placement = new GamePlay.Component.GPlacementComponent(); actor.Placement = placement; var particleComp = new Bricks.Particle.GParticleComponent(); var particleInit = new Bricks.Particle.GParticleComponent.GParticleComponentInitializer(); particleInit.MeshName = gmsName; particleInit.MacrossName = macross; await particleComp.SetInitializer(rc, actor, actor, particleInit); particleComp.IsIdentityDrawTransform = true; actor.AddComponent(particleComp); return(actor); }
public static async System.Threading.Tasks.Task <GActor> NewNavMeshActorAsync(Bricks.RecastRuntime.CNavMesh navMesh) { var rc = CEngine.Instance.RenderContext; var actor = new GamePlay.Actor.GActor(); actor.ActorId = Guid.NewGuid(); var placement = new GamePlay.Component.GPlacementComponent(); actor.Placement = placement; var navComp = new Bricks.RecastRuntime.CNavMeshComponent(); var init = new Bricks.RecastRuntime.CNavMeshComponent.CNavMeshComponentInitializer(); navComp.NavMesh = navMesh; await navComp.SetInitializer(rc, actor, actor, init); actor.AddComponent(navComp); return(actor); }