Пример #1
0
 private void Start()
 {
     enemySpawner    = FindObjectOfType <EnemySpawner>();
     towers          = GameObject.FindGameObjectsWithTag("Tower");
     defenseSupports = GameObject.FindGameObjectsWithTag("DefenseSupport");
     slowStick       = GameObject.FindGameObjectWithTag("SlowStick");
     defensesStore   = FindObjectOfType <DefensesStore>();
     defenseHoverer  = FindObjectOfType <DefenseHoverOutliner>();
 }
Пример #2
0
    public static void SaveDefenseStore(DefensesStore defensesStore)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/defensesStore.save";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        DefensesStoreData data = new DefensesStoreData(defensesStore);

        formatter.Serialize(stream, data);
        stream.Close();
    }
Пример #3
0
    void Start()
    {
        towers          = FindObjectsOfType <TowerMover>();
        supports        = FindObjectsOfType <DefenseSupportMover>();
        enemySpawner    = FindObjectOfType <EnemySpawner>();
        loseSFX         = GetComponent <AudioSource>();
        slowEffects     = FindObjectsOfType <SlowEffect>();
        winPointCounter = FindObjectOfType <WinPointCounter>();
        defensesStore   = FindObjectOfType <DefensesStore>();
        defenseHover    = FindObjectOfType <DefenseHoverOutliner>();
        moveViewRot     = menuViewRot;

        foreach (GameObject level in levels)
        {
            levelScores.Add(0);
        }
    }
Пример #4
0
 private void Start()
 {
     winPointCounter = FindObjectOfType <WinPointCounter>();
     defensesStore   = FindObjectOfType <DefensesStore>();
     loadManager     = FindObjectOfType <LoadManager>();
 }
Пример #5
0
 void Start()
 {
     defensesStore = FindObjectOfType <DefensesStore>();
 }
Пример #6
0
 public DefensesStoreData(DefensesStore defensesStore)
 {
     purchasableTowersSavedIndex    = defensesStore.purchasableTowers.Count - 1;
     purchasableSupportsSavedIndex  = defensesStore.purchasableSupports.Count - 1;
     purchasableGlueStickSavedIndex = defensesStore.purchasableGlueSticks.Count - 1;
 }