Пример #1
0
    private void Start()
    {
        gameManager = GetComponent <GameManager>();
        //GenerateNewLevel(); // on run this in start if testing.

        gameLogic = GetComponent <GameLogic>();

        spawnEnemiesHelper = GetComponent <SpawnEnemiesHelper>();
    }
Пример #2
0
    private void Start()
    {
        gameManger         = GetComponent <GameManager>();
        spawnEnemiesHelper = GetComponent <SpawnEnemiesHelper>();

        leftPortal   = gameManger.leftPortal;
        middlePortal = gameManger.middlePortal;
        rightPortal  = gameManger.rightPortal;
    }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        gameManager        = GameObject.Find("GameManager").GetComponent <GameManager>();
        spawnEnemiesHelper = GameObject.Find("GameManager").GetComponent <SpawnEnemiesHelper>();
        rightMeshRenderer  = transform.Find("Right-Side").GetComponent <MeshRenderer>();
        rightBoxCollider   = transform.Find("Right-Side").GetComponent <BoxCollider>();
        leftMeshRenderer   = transform.Find("Left-Side").GetComponent <MeshRenderer>();
        leftBoxCollider    = transform.Find("Left-Side").GetComponent <BoxCollider>();

        rightSectionPlatform = transform.Find("Right-Side").gameObject;
        leftSectionPlatform  = transform.Find("Left-Side").gameObject;

        DOTween.Init();

        pulseTime = 0;
    }
Пример #4
0
    // Start is called before the first frame update
    void Awake()
    {
        // Set up level stuff.
        //Enemy spawn
        Level            = GameObject.Find("Level");
        EnemyRightSpawn  = Level.transform.Find("Platforms").transform.Find("Right").transform.Find("EnemySpawn");
        EnemyMiddleSpawn = Level.transform.Find("Platforms").transform.Find("Middle").transform.Find("EnemySpawn");
        EnemyLeftSpawn   = Level.transform.Find("Platforms").transform.Find("Left").transform.Find("EnemySpawn");


        //Player move positions
        PlayerPosRight  = Level.transform.Find("Platforms").transform.Find("Right").transform.Find("PlayerPosition");
        PlayerPosMiddle = Level.transform.Find("Platforms").transform.Find("Middle").transform.Find("PlayerPosition");
        PlayerPosLeft   = Level.transform.Find("Platforms").transform.Find("Left").transform.Find("PlayerPosition");


        //Setup Player
        player = GameObject.Find("Player").GetComponent <Player>();
        // get player positions.
        player.RightPosition  = PlayerPosRight;
        player.MiddlePosition = PlayerPosMiddle;
        player.LeftPosition   = PlayerPosLeft;

        //assign current level platforms
        rightPlatform  = Level.transform.Find("Platforms").transform.Find("Right").transform.Find("RightPlatform").GetComponent <Platform>();
        leftPlatform   = Level.transform.Find("Platforms").transform.Find("Left").transform.Find("LeftPlatform").GetComponent <Platform>();
        middlePlatform = Level.transform.Find("Platforms").transform.Find("Middle").transform.Find("MiddlePlatform").GetComponent <Platform>();

        //Get Portals
        leftPortal   = Level.transform.Find("Platforms").transform.Find("Left").transform.Find("Portal").GetComponent <Portal>();
        middlePortal = Level.transform.Find("Platforms").transform.Find("Middle").transform.Find("Portal").GetComponent <Portal>();
        rightPortal  = Level.transform.Find("Platforms").transform.Find("Right").transform.Find("Portal").GetComponent <Portal>();

        // get Level Generation script
        levelGeneration = GetComponent <LevelGeneration>();

        //Get slam detection from player gameobject
        slamDetection = GameObject.Find("Player").GetComponent <SlamDetection>();

        spawnEnemiesHelper = GetComponent <SpawnEnemiesHelper>();
        spawnEnemiesHelper.pauseEnemySpawning = true;

        mobileController = GameObject.Find("MobileController").GetComponent <MobileController>();
    }
Пример #5
0
 private void Start()
 {
     spawnEnemiesHelper = GetComponent <SpawnEnemiesHelper>();
     gameManager        = GetComponent <GameManager>();
     levelGeneration    = GetComponent <LevelGeneration>();
 }
Пример #6
0
 private void Start()
 {
     spawnEnemiesHelper = GameObject.Find("GameManager").GetComponent <SpawnEnemiesHelper>();
     levelGeneration    = GameObject.Find("GameManager").GetComponent <LevelGeneration>();
     gameLogic          = GameObject.Find("GameManager").GetComponent <GameLogic>();
 }