protected override void CreateScene() { this.Load(WaveContent.Scenes.MyScene); this.spinner = new Spinner { IncreaseX = 1, IncreaseY = 1, IncreaseZ = 1 }; var green = new Color(76, 217, 100); var cube = new Entity().AddComponent(Model.CreateCube()) .AddComponent(new ModelRenderer()) .AddComponent(new MaterialsMap(new StandardMaterial() { DiffuseColor = green, LightingEnabled = true })) .AddComponent(new Transform3D()) .AddComponent(this.spinner); this.EntityManager.Add(cube); }
protected override void CreateScene() { this.Load(WaveContent.Scenes.MyScene); this.spinner = this.EntityManager.Find("cube")?.FindComponent<Spinner>(); }