Пример #1
0
 void Start()
 {
     GameManager   = GameObject.FindGameObjectWithTag("GM").GetComponent <GM_1>();
     listNumImages = new List <Sprite>
     {
         num0,
         num1,
         num2,
         num3,
         num4,
         num5,
         num6,
         num7,
         num8,
         num9,
         period
     };
     listDisplayImages = new List <Image>
     {
         firstNum,
         secondNum,
         thirdNum,
         fourthNum
     };
     listDisplayImagesTargetTime = new List <Image>
     {
         firstNumTime,
         secondNumTime,
         thirdNumTime,
         fourthNumTime
     };
     DisplayTargetTime();
     StartCoroutine(UpdateTime());
 }
Пример #2
0
    //public bool isCollected;

    // Use this for initialization
    void Start()
    {
        ScoreManager_Script = GameObject.FindGameObjectWithTag("ScoreManager").GetComponent <ScoreManagerScript>();
        SM_Script           = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManagerScript>();
        GM_1Script          = GameObject.FindGameObjectWithTag("GM").GetComponent <GM_1>();
        BeeM_Script         = GameObject.FindGameObjectWithTag("BeeM").GetComponent <BeeMScript>();
        Claw_Script         = GameObject.FindGameObjectWithTag("Claw").GetComponent <ClawScript>();

        QueenAnimation = this.GetComponent <Animator> ();
    }
Пример #3
0
 void Start()
 {
     GM = GameObject.FindGameObjectWithTag("GM").GetComponent <GM_1>();
     HudRippleFrames = new List <Sprite>();
     HudRipple       = Resources.Load("Prefabs/HudRipple");
     for (int i = 0; i < 9; i++)
     {
         HudRippleFrames.Add(Resources.Load <Sprite>("Sprites/Ripple/ripple" + i));
     }
     HudRippleFrames.Add(Resources.Load <Sprite>("Sprites/Transparent 1x1"));
 }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        waveCount               = 0;
        beeList                 = new List <GameObject>();
        SpawnPoints             = new List <Vector3>();
        SpawnIndices            = new List <int>();
        beeValue                = 1;
        BeePrefab               = Resources.Load("Prefabs/BeeEnemy");
        BeeBurstPrefab          = Resources.Load("Prefabs/BeeBurst");
        ScoreChangeSpritePrefab = Resources.Load("Prefabs/ScoreChangeSprite");
        AngryBeePrefab          = Resources.Load("Prefabs/SoldierBee");
        QueenBeePrefab          = Resources.Load("Prefabs/QueenBee");
        //---------------------should be null checking in this region----------------------------------//
        AngryBeeSpawnPoint = GameObject.FindGameObjectWithTag("ScoreManager").GetComponent <Transform>().position;
        Hive = GameObject.FindGameObjectWithTag("BeeHive");         //So we can move the BeeHive and not worry about it's position-Need to instantiate the Background with BeeHive
        gm   = GameObject.FindGameObjectWithTag("GM").GetComponent <GM_1>();
        //---------------------end of where null checking should be done-------------------------------//
        for (int x = 0; x < 5; ++x)
        {
            SpawnPoints.Add(transform.GetChild(x).position);
            SpawnIndices.Add(x);
        }
        DirChangeLeft  = transform.GetChild(5).position;
        DirChangeRight = transform.GetChild(6).position;
        //Checking Difficulty and setting amount of bees to be spawned
        if (SVM_Script.gameDifficulty == "easy")
        {
            numberOfBEES = 2;
            beeSpeed     = 6.0f;
            isExpert     = false;
        }
        else if (SVM_Script.gameDifficulty == "advance")
        {
            numberOfBEES = 3;
            beeSpeed     = 6.5f;
            isExpert     = false;
            StartCoroutine(AngryBeeSpawner());
        }
        else if (SVM_Script.gameDifficulty == "expert")
        {
            numberOfBEES  = 2;
            beeSpeed      = 7f;
            queenBeeSpeed = 5.5f;

            isExpert = true;
            StartCoroutine(AngryBeeSpawner());
        }
    }