示例#1
0
    void Start()
    {
        copyOfCompleteDeckOfCards = new Dictionary <int, cardClass>(CardsReadIn.CompleteDeckOfCards);
        //gets reference to DrawScript and CardFunctions//
        DrawScriptRef    = GetComponent <drawScript>();
        CardFunctionsRef = GetComponent <CardFunctions>();
        ActiveSupplyRef  = GetComponent <ActiveSupply>();
        EnemyCreationRef = GetComponent <EnemyCreation>();

        SortPlayers(PlayerCreation.listOfSelectedPlayers);

        PlayerActive();

        //creates the first slime
        if (loadEnemy == "Slime")
        {
            EnemyCreationRef.LargeSlimeCreation();
        }
        else if (loadEnemy == "Rat")
        {
            EnemyCreationRef.RatGameScene();
        }


        #region Set UIs
        MainUI.SetActive(true);
        ActiveSupplyUI.SetActive(false);
        discardSelectionUI.SetActive(false);
        destroyCardSelectionUI.SetActive(false);
        gameOverUI.SetActive(false);
        winUI.SetActive(false);
        #endregion

        UpdateEnemyTransforms();
    }
示例#2
0
 void Start()
 {
     upgradeMenu = GameObject.Find("UpgradeManager").GetComponent <UpgradeMenu>();
     enemyList   = GameObject.Find("GameManager").GetComponent <EnemyCreation>();
     gameSystems = GameObject.Find("GameManager").GetComponent <GameSystems>();
     spawnPoint  = GameObject.Find("SpawnPoint");
     mobInfo     = GameObject.Find("MobInfo").GetComponent <MobInfo>();
     for (int i = 0; i < Points.Count; i++)
     {
         Points[i] = GameObject.Find("Point_" + i);
     }
     _currentSpeed = enemyData.speed * upgradeCoinData.difficulty;
     _health       = enemyData.maxHealth * upgradeCoinData.difficulty;
     gameObject.GetComponent <Image>().sprite = enemyData.mobImage;
     StartCoroutine(MovingToPoints());
     StartCoroutine(Aliments());
 }
示例#3
0
 void Awake()
 {
     Instance      = this;
     EnemyNumber   = Random.Range(MIN_NUM, MAX_NUM);
     timeValCreate = CREATE_CD;
 }