Exemplo n.º 1
0
        private void CreatePlatforms()
        {
            PlatformBase currentPlatform = platformData.PlatformFactory.GetInstance();

            currentPlatform.SetLaneController(laneData);
            currentPlatform.SetObstaclesData(obstaclesData);
            currentPlatform.SetCollectablesData(collectablesData);
            currentPlatform.SetCollectablesController(collectablesController);
            currentPlatform.transform.SetParent(platformData.PlatformHolder);
            currentPlatform.transform.position = Vector3.forward * currentPlatformPos.z;
            currentPlatformPos.z += platformData.PlatformLenght;
            currentPlatform.gameObject.SetActive(true);
            currentPlatform.Init();
            currentPlatform.EnablePlatform();
            platformPool.SetInstance(currentPlatform);
        }