Click or drag to resize

MagicGame Class

The main game configuration.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          RavingBots.MagicGestures.UtilsMonoSingletonMagicGame
            RavingBots.MagicGestures.GameMagicGame

Namespace:  RavingBots.MagicGestures.Game
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class MagicGame : MonoSingleton<MagicGame>

The MagicGame type exposes the following members.

Constructors
  NameDescription
Public methodMagicGame
Initializes a new instance of the MagicGame class
Top
Properties
  NameDescription
Public propertyEffectCount
The number of configured spells.
Protected propertyMagicEffectPools
The pools of the spell effect objects.
Top
Methods
  NameDescription
Protected methodAwake
Initialize the object pools.
(Overrides MonoSingletonTAwake.)
Public methodCreateMagicEffect
Get a spell effect object.
Public methodGetRandomEffectId
Get a random spell index.
Protected methodLoadData
Load the data from the ScriptableObject asset into the game components.
Protected methodOnApplicationQuit
Trigger an autosave if SaveOnQuit is set.
Public methodQuit
Quit the game.
Protected methodSaveData
Save the current data into an asset.
Private methodShowWelcome
Show the welcome screen after a delay (coroutine).
Protected methodStart
Load the spell data and show the welcome screen.
Protected methodUpdate
Top
Fields
  NameDescription
Protected fieldGameData
The prefab containing the network and configured gestures.
Protected fieldMagicEffectPrefabs
The spell effect prefabs.
Private fieldStatic memberPrecache
The number of spell effect objects cached when a pool is created.
Protected fieldSaveOnQuit
If , GameData will be saved when the game quits.
Top
Remarks
This component contains the main configuration of the game, as well as the runtime object pools for the spell effects.
See Also