hitdirectionsplash.c 792 B

1234567891011121314151617181920212223242526272829303132
  1. class HitDirectionEffectSplash extends HitDirectionEffectBase
  2. {
  3. override HitDirectionImagesBase GetImageData()
  4. {
  5. typename type = HitDirectionImagesSplash;
  6. HitDirectionImagesSplash data = HitDirectionImagesSplash.Cast(type.Spawn());
  7. return data;
  8. }
  9. override void FinalizePositionCalculation()
  10. {
  11. //blobs move around the edges, the rest on elypsis
  12. m_PosX = m_PosXScreenEdge;
  13. m_PosY = m_PosYScreenEdge;
  14. }
  15. override void SetIndicatorRotation(float timeslice = -1.0)
  16. {
  17. if ( timeslice == -1.0) //does not rotate on dynamic mode update
  18. {
  19. if (m_RotationOverride == HitDirectionConstants.ROTATION_DEFAULT)
  20. {
  21. m_LayoutRoot.SetRotation(0,0,Math.RandomIntInclusive(0,359),true);
  22. }
  23. else
  24. {
  25. m_LayoutRoot.SetRotation(0,0,m_RotationOverride,true);
  26. }
  27. }
  28. }
  29. }