Ejemplo n.º 1
0
    public Player SpawnPlayer(Vector3 _spawnPosition)
    {
        Player spawnedPlayer = InstantiateModule.InstantiateObjectWithScript <Player>(PrefabCollection.Player);

        spawnedPlayer.transform.position = _spawnPosition;
        return(spawnedPlayer);
    }
Ejemplo n.º 2
0
    public Core SpawnCore(CoreParameters _coreSpawnParameters)
    {
        Core _spawnedCore = InstantiateModule.InstantiateObjectWithScript <Core>(PrefabCollection.Core);

        _spawnedCore.SetupParameters(_coreSpawnParameters);
        return(_spawnedCore);
    }
Ejemplo n.º 3
0
    public SpawnPointWheel SpawnWheelSpawnerObject(Vector2 _spawnPosition)
    {
        SpawnPointWheel spawnedSpawnPointWheel = InstantiateModule.InstantiateObjectWithScript <SpawnPointWheel>(PrefabCollection.SpawnPointWheel);

        spawnedSpawnPointWheel.transform.position = _spawnPosition;
        return(spawnedSpawnPointWheel);
    }
Ejemplo n.º 4
0
    public OrbitatingSpawnKickTargetPoint SpawnOrbitatingSpawnKickTargetPoint(Vector2 _position)
    {
        OrbitatingSpawnKickTargetPoint spawnedOrbiationWheel = InstantiateModule.InstantiateObjectWithScript <OrbitatingSpawnKickTargetPoint>(PrefabCollection.OrbitatingSpawnKickTargetPoint);

        spawnedOrbiationWheel.Setup();
        spawnedOrbiationWheel.transform.position = _position;
        return(spawnedOrbiationWheel);
    }
Ejemplo n.º 5
0
    public OrbitationWheel SpawnOrbitationWheel(Vector2 _position)
    {
        OrbitationWheel spawnedOrbiationWheel = InstantiateModule.InstantiateObjectWithScript <OrbitationWheel>(PrefabCollection.OrbitationWheel);

        spawnedOrbiationWheel.Setup();
        spawnedOrbiationWheel.transform.position = _position;
        return(spawnedOrbiationWheel);
    }
Ejemplo n.º 6
0
    public Defender SpawnDefender(Vector3 _spawnPosition)
    {
        Defender         spawnedDefender         = InstantiateModule.InstantiateObjectWithScript <Defender>(PrefabCollection.Defender);
        ForceObjectCloud spawnedForceObjectCloud = InstantiateModule.InstantiateObjectWithScript <ForceObjectCloud>(PrefabCollection.ForceObjectCloud);

        spawnedForceObjectCloud.transform.SetParent(spawnedDefender.transform);
        spawnedDefender.transform.position = _spawnPosition;
        return(spawnedDefender);
    }
Ejemplo n.º 7
0
 public void LaunchModules()
 {
     InstantiateModule     = MainController.Instance.ModuleCreator.Create <InstantiateModule>   ("InstantiateModule");
     PoolModule            = MainController.Instance.ModuleCreator.Create <PoolModule>          ("PoolModule");
     PrefabCollection      = MainController.Instance.ModuleCreator.Create <PrefabCollection>    ("PrefabCollection");
     ObjectSpawner         = MainController.Instance.ModuleCreator.Create <ObjectSpawner>       ("ObjectSpawner");
     LevelCollection       = new LevelCollection();
     LevelLoader           = new LevelLoader();
     TimeingManager        = new TimeingManager();
     InputModuleUIMode     = new InputModuleUIMode();
     InputModulePlayMode   = new InputModulePlayMode();
     StageCreator          = new StageCreator();
     CoreParametersCreator = new CoreParametersCreator();
     PointSystemCreator    = new PointSystemCreator();
 }
Ejemplo n.º 8
0
    public void CreatePool(Transform prefab, int capacity, string name)
    {
        GameObject createdPoolHolder = new GameObject(name);

        createdPoolHolder.transform.SetParent(this.transform);

        int poolKey = prefab.GetInstanceID();
        Queue <PoolableObject> newPool = new Queue <PoolableObject>(capacity);

        for (int i = 0; i < capacity; i++)
        {
            PoolableObject newObject = InstantiateModule.InstantiateObjectWithScript <PoolableObject>(prefab);
            newObject.SetPoolKey(poolKey);
            newObject.gameObject.transform.SetParent(createdPoolHolder.transform);
            newObject.gameObject.SetActive(false);
            newPool.Enqueue(newObject);
        }
        _poolDictionary.Add(poolKey, newPool);
    }
Ejemplo n.º 9
0
    public PointRing Create3PointRingInverted(float _size)
    {
        PointRing _newPointRing = InstantiateModule.InstantiateObjectWithScript <PointRing>(PrefabCollection.PointRing);

        PositionPoint[] _positionPoints = new PositionPoint[3];
        for (int i = 0; i < _positionPoints.Length; i++)
        {
            _positionPoints[i] = InstantiateModule.InstantiateObjectWithScript <PositionPoint>(PrefabCollection.PositionPoint);
        }
        _positionPoints[0].transform.position = new Vector3(0 * _size, -2.7f * _size, 5 * _size);
        _positionPoints[1].transform.position = new Vector3(0 * _size, -2.7f * _size, -5 * _size);
        _positionPoints[2].transform.position = new Vector3(0 * _size, 6f * _size, 0 * _size);

        _newPointRing.Points = _positionPoints;
        for (int i = 0; i < _positionPoints.Length; i++)
        {
            _positionPoints[i].transform.SetParent(_newPointRing.transform);
        }
        return(_newPointRing);
    }