Beispiel #1
0
 public LevelGeneratorModel(LevelGeneratorData levelGeneratorData, PoolContext poolContext, GameObject generatorObject)
 {
     _levelGeneratorData = levelGeneratorData;
     _poolContext        = poolContext;
     _edgeCollider       = generatorObject.GetComponent <EdgeCollider2D>();
     _lineRenderer       = generatorObject.GetComponent <LineRenderer>();
 }
        public LevelGeneratorInitializeController(PoolContext poolContext, LevelGeneratorData generatorData)
        {
            var generatorObject = Object.Instantiate(generatorData.GeneratorObject, Vector3.zero, Quaternion.identity);

            poolContext.LevelGeneratorModel =
                new LevelGeneratorModel(generatorData, poolContext, generatorObject);
        }
Beispiel #3
0
        private void Start()
        {
            PoolContext poolContext = new PoolContext(_playerStartPosition.position);

            _mainController = new MainControllers();

            new AllControllersInitialozator(_playerData, poolContext, _mainController, _levelGeneratorData);
        }
Beispiel #4
0
        public RestartGameEventController(PoolContext poolContext)
        {
            var collisionBehaviour =
                poolContext.PlayerModel.GetPlayerObject().GetComponent <SteeringWheelCollisionBehaviour>();

            _steeringWheelCollisionBehaviour = collisionBehaviour;
            _steeringWheelCollisionBehaviour.OnCollisionEnterHandler += OnCollisionEnterHandler;
        }
 public WheelieDetectorController(PoolContext poolContext)
 {
     _poolContext = poolContext;
     poolContext.WheelieDetectorModel.CurrentWheelieTimer
         = poolContext.WheelieDetectorModel.StartWheelieTimer;
 }
        public PlayerDistanceViewInitializeContoller(PoolContext poolContext)
        {
            _poolContext = poolContext;

            _poolContext.DistanceText = GameObject.Find("Distance Text").GetComponent <Text>();
        }
        public PlayerInitializeController(PlayerData playerData, Vector3 spawnPosition, PoolContext poolContext)
        {
            var playerObject = Object.Instantiate(playerData.PlayerObject, spawnPosition, Quaternion.identity);

            PlayerModel playerModel = new PlayerModel(playerObject.transform, playerData);

            poolContext.PlayerModel = playerModel;
        }
 public PlayerDistanceView(PoolContext poolContext)
 {
     _poolContext = poolContext;
 }
Beispiel #9
0
        public CameraInitializeController(PoolContext poolContext)
        {
            var camera = Camera.main;

            poolContext.CameraModel = new CameraModel(poolContext, camera);
        }
Beispiel #10
0
 public PlayerInputController(PoolContext poolContext)
 {
     _gameContext      = poolContext;
     _middleSceenPoint = Screen.width / 2;
 }
Beispiel #11
0
 public CameraModel(PoolContext poolContext, Camera mainCamera)
 {
     _mainCamera  = mainCamera;
     _poolContext = poolContext;
 }
 public PlayerWheelieViewInitializeController(PoolContext poolContext)
 {
     _poolContext             = poolContext;
     _poolContext.WheelieText = GameObject.Find("Wheelie Text").GetComponent <Text>();
 }