コード例 #1
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.Find("RPlayer").GetComponent <Player> ();
        bob    = GameObject.Find("Bob").GetComponent <Bob> ();
        robo   = GameObject.Find("Robo-Jake").GetComponent <RoboJake> ();
        dogBot = GameObject.Find("DogBot-Bobby").GetComponent <DogBotBobby> ();
        dron   = GameObject.Find("DronAK-1400").GetComponent <Dron> ();
        litus  = GameObject.Find("Litus").GetComponent <Litus> ();
        sharot = GameObject.Find("Sharot").GetComponent <Sharot> ();
        mateo  = GameObject.Find("Mateo Rodriguez").GetComponent <Mateo> ();
        bik    = GameObject.Find("BikKlubber the Merc.").GetComponent <Bik> ();
        laser  = GameObject.Find("Laser Automata").GetComponent <Laser> ();

        weaponR  = GameObject.Find("WeaponRandom").GetComponent <WeaponRandom> ();
        weapon01 = GameObject.Find("WeaponsCode").GetComponent <Weapon01> ();
        weapon02 = GameObject.Find("WeaponsCode").GetComponent <Weapon02> ();
        weapon03 = GameObject.Find("WeaponsCode").GetComponent <Weapon03> ();

        ability01 = GameObject.Find("Abilities").GetComponent <Abilitie01_PlasmaGranade> ();
        ability04 = GameObject.Find("Abilities").GetComponent <Abilitie04_GoldShot> ();

        mainScript      = GameObject.Find("Main Camera").GetComponent <monsterHp> ();
        backgroundB     = GameObject.Find("Ascensor").GetComponent <BackgroundBehavior> ();
        soundEffectsBtn = GameObject.Find("SoundEffectsButtonCode").GetComponent <StopSoundEffectsButton> ();
        BgMusicBtn      = GameObject.Find("BgMusicButtonCode").GetComponent <StopBgMusicButton> ();
        offlineIncome   = GameObject.Find("OfflineIncome").GetComponent <OfflineIncome> ();

        variablesToLoad();
    }
コード例 #2
0
    void Start()
    {
        worldBounds     = transform.Find("WorldBounds").GetChild(0).GetComponent <EdgeCreator>();
        enemyManager    = transform.Find("EnemyManager").GetComponent <EnemyGenerator>();
        ballManager     = transform.Find("BallManager").GetComponent <BallGenerator>();
        lvlDisplay      = transform.Find("GameStatsBar").Find("LevelDisplay").GetComponent <LevelDisplayController>();
        lifeDisplay     = transform.Find("GameStatsBar").Find("LifeDisplay").GetComponent <LifeDisplay>();
        gameOver        = transform.Find("GameOver").gameObject;
        obstacleManager = transform.Find("ObstacleManager").GetComponent <ObstacleGenerator>();
        background      = transform.Find("Background").GetComponent <BackgroundBehavior>();
        /*feedback = transform.Find("FilledFeedback").GetComponent<FillerFeedbackScript>();*/
        progressPie = transform.Find("GameStatsBar").Find("ProgressPie").GetComponent <ProgressPie>();


        // kickstart the first level
        enemyManager.numEnemies = currLevel;
        LevelBegin();
    }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        player     = GameObject.Find("Player").GetComponent <PlayerBehavior>();
        background = GameObject.Find("Background").GetComponent <BackgroundBehavior>();
        spawner    = GameObject.Find("Spawner");
        canvas     = GameObject.Find("Canvas").GetComponent <Canvas>();

        gameOverPanel = canvas.transform.Find("Panel").GetComponent <RectTransform>();
        respawnButton = gameOverPanel.transform.Find("RespawnButton").GetComponent <Button>();
        abilityButton = canvas.transform.Find("AbilityButton").GetComponent <Button>();

        abilityButton.onClick.AddListener(delegate { player.CastOrb(); });
        respawnButton.onClick.AddListener(delegate { RestartScene(); });

        startTime = Time.time;

        GlobalClock  = new TimeClass("TimeText", canvas, this);
        AbilityClock = new TimeClass("AbilityTimeText", canvas, this);
    }