CPStarStreak
An individual streak descriptor used by CPStarStreakShader.
Attributes
- ch
Character to use to draw stars in this streak.
- colors
Set of initial color for fading from. Colors will be randomly chosen for each star.
- ratio
Percentage of stars visible at the same time. For example, the value of
0.04
means 4%, and if the camera frame size is 100x50 characters then 4% ratio will result in 200 stars showing at any given time.- speed
Tuple defining the X and Y-axis increment on each frame. This tuples defines both the speed and the direction stars in this streak will move with.
- steps
Number of frames that it takes for entire star lifecycle in this streak.
- z
Z-index at which to draw the stars in this streak.
- See also:
- Example:
See CPShaderExample class for the example of using shaders.
See org.cosplay.games.snake.CPSnakeTitleScene game scene for example of using this shader.
- Source:
- CPStarStreakShader.scala
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any