示例#1
0
 void Start()
 {
     winSFX                 = GetComponent <AudioSource>();
     winPointCounter        = FindObjectOfType <WinPointCounter>();
     originalTrophyPosition = this.transform.position;
     originalTrophyRotation = this.transform.rotation;
 }
示例#2
0
    //vvv SAVE vvv

    public static void SaveWinPoints(WinPointCounter winPointCounter)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/winPoints.save";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        WinPointData data = new WinPointData(winPointCounter);

        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
 public WinPointData(WinPointCounter winPointCounter)
 {
     winPoints          = winPointCounter.winPoints;
     purchaseUnlockCost = winPointCounter.purchaseUnlockCost;
 }
示例#5
0
 private void Start()
 {
     winPointCounter = FindObjectOfType <WinPointCounter>();
     defensesStore   = FindObjectOfType <DefensesStore>();
     loadManager     = FindObjectOfType <LoadManager>();
 }