示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (enableAutomaticSpawn)
     {
         if (Random.Range(1, (ruleAndUi.GetSpawnRate())) == Random.Range(1, (ruleAndUi.GetSpawnRate())))
         {
             SpawnNow();
         }
     }
 }
示例#2
0
    // Use this for initialization
    void Start()
    {
        ResourcesMoney        = GameObject.Find("ResourcesMoney").GetComponent <Text>();
        MoneyText             = GameObject.Find("MoneyText").GetComponent <Text>();
        ScoreHolderGameObject = GameObject.Find("ScoreHolderGameObject");
        score = ScoreHolderGameObject.GetComponent <ScoreHolder>();

        soundManagement = GameObject.Find("GameplaySoundManagementGameObject");
        gs = soundManagement.GetComponent <GameplaySoundMangement>();

        ruleAndUi = GameObject.Find("GamePlayUIandRuleManagement").GetComponent <OptionSetting>();
        SpawnRate = SpawnRate + ruleAndUi.GetSpawnRate();
    }