Skip to content

Danmaku Game Controller

James Liu edited this page Apr 25, 2015 · 2 revisions

The Danmaku Game Controller is the driver behind all Danmaku actions. Without it, no bullet can be fired. Simply have one of these in every scene as you want to fire bullets in. If a Danmaku Game Controller does not exist in the current scene, on firing the first bullet, a default one will be automatically instantiated.

The Danmaku Game Controller acts as a settings panel. It controls the overarching general behavior of all bullets created and used.

Inspector View

Property Description
Destroy New Instances If true, new instances of Danmaku Game Controller will be destroyed on instantiation. If false, the current instance of Danmaku Game Controller will be destroyed when a new one is instantiated
Frame Rate Independent If set to true, all timed functions used by DanmakU will scale with the change in real time. If set to false, all timed functions will advance a fixed amount each frame.
Maximum Lives What is the maximum number of lives players have to expend (thinking of moving this to another manager)
Danmaku Initial Count This controls how many Danmaku are preallocated in DanmakU's pooling system. Set higher or lower depending on how many bullets you expect to spawn. (Default 1000, Recommended 500-5000).
Danmaku Spawn on Empty How many Danmaku to add to the pool when the pool is empty, this controls how many are spawned in when the system asks for more bullets than currently exist.
Angle Resolution To increase performance, DanmakU precalculates unit circle values an caches them for quick use. Setting to a lower value will increase the accuracy of the resultant trigonometric calculations. Default: 0.1, Recommended: 0.1 ~ 1
Clone this wiki locally