MaterialAnimation.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #pragma once
  4. #include "Sample.h"
  5. namespace Urho3D
  6. {
  7. class Node;
  8. class Scene;
  9. }
  10. /// Material animation example.
  11. /// This sample is base on StaticScene, and it demonstrates:
  12. /// - Usage of material shader animation for mush room material
  13. class MaterialAnimation : public Sample
  14. {
  15. URHO3D_OBJECT(MaterialAnimation, Sample);
  16. public:
  17. /// Construct.
  18. explicit MaterialAnimation(Context* context);
  19. /// Setup after engine initialization and before running the main loop.
  20. void Start() override;
  21. private:
  22. /// Construct the scene content.
  23. void CreateScene();
  24. /// Construct an instruction text to the UI.
  25. void CreateInstructions();
  26. /// Set up a viewport for displaying the scene.
  27. void SetupViewport();
  28. /// Read input and moves the camera.
  29. void MoveCamera(float timeStep);
  30. /// Subscribe to application-wide logic update events.
  31. void SubscribeToEvents();
  32. /// Handle the logic update event.
  33. void HandleUpdate(StringHash eventType, VariantMap& eventData);
  34. };