private void Start() { enemySpawner = FindObjectOfType <EnemySpawner>(); towers = GameObject.FindGameObjectsWithTag("Tower"); defenseSupports = GameObject.FindGameObjectsWithTag("DefenseSupport"); slowStick = GameObject.FindGameObjectWithTag("SlowStick"); defensesStore = FindObjectOfType <DefensesStore>(); defenseHoverer = FindObjectOfType <DefenseHoverOutliner>(); }
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(); }
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); } }
private void Start() { winPointCounter = FindObjectOfType <WinPointCounter>(); defensesStore = FindObjectOfType <DefensesStore>(); loadManager = FindObjectOfType <LoadManager>(); }
void Start() { defensesStore = FindObjectOfType <DefensesStore>(); }
public DefensesStoreData(DefensesStore defensesStore) { purchasableTowersSavedIndex = defensesStore.purchasableTowers.Count - 1; purchasableSupportsSavedIndex = defensesStore.purchasableSupports.Count - 1; purchasableGlueStickSavedIndex = defensesStore.purchasableGlueSticks.Count - 1; }