Spins a model around an imaginary axis.
Наследование: Behavior
Пример #1
0
        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);
        }
Пример #2
0
        protected override void CreateScene()
        {
            this.Load(WaveContent.Scenes.MyScene);

            this.spinner = this.EntityManager.Find("cube")?.FindComponent<Spinner>();
        }