void Start() { inputStateFactory = new InputStateFactory(); InputHandlerUpdater = new InputHandlerUpdater(gameObject); InputHandlerUpdater.CurrentInputHandler = (InputHandlerState)InputStateFactory.CreateProduct( (int)FactoriesProducts.InputstateProducts.UINavigatorDefaultState, this, gameObject); objectRefresher = new EventsystemCurrentGameObjectRefresher(EventSystem.current); updaters.AddRange(new List <IUpdater>() { InputHandlerUpdater, objectRefresher }); }
//Read scriptableobject for different configurations private void Start() { inputStateFactory = new InputStateFactory(); inputhandlerUpdater = new InputHandlerUpdater(gameObject); inputhandlerUpdater.CurrentInputHandler = (InputHandlerState)InputStateFactory.CreateProduct( (int)FactoriesProducts.InputstateProducts.PlayerInputHandlerDefaultState, this, gameObject); powerUpInventory = new PowerUpInventory(); playerCollisionHandler = new PlayerCollisionHandler(gameObject, powerUpInventory); movementDataHolder = Resources.Load("Prefabs/DefaultMovementDataHolder") as MovementDataHolder; updaters.Add(inputhandlerUpdater); fixedUpdaters.Add(inputhandlerUpdater); collideAbles.Add(playerCollisionHandler); }