public PlayerShipModel( DefinitionsData definitions, Rigidbody2D rigidBody, PlayerInputState inputState) { this.rigidBody = rigidBody; this.definitions = definitions; this.inputState = inputState; }
public GameStateManager(UserData userData, DefinitionsData definitions, Settings settings) { this.userData = userData; this.definitions = definitions; this.settings = settings; gameState = new StateMachineSimple(); gameState.MapState(StateInitialize); gameState.SwitchToState(StateInitialize); }
public override void InstallBindings() { DefinitionsData defData = new DefinitionsData(); DefinitionsLoader.LoadDefinitions(defData); Container.Bind <DefinitionsData>().FromInstance(defData).AsSingle(); Container.Bind <GameStateManager>().AsSingle().NonLazy(); //load the user data from somewhere Container.Bind <UserData>().AsSingle().NonLazy(); }
public static void LoadDefinitions(DefinitionsData definitionData) { TextAsset blockText = Resources.Load <TextAsset>("Definitions/Ships"); definitionData.ShipDefinitions = JsonReader.Deserialize <ShipDefinition[]>(blockText.text); }