Пример #1
0
 // Start is called before the-first frame update
 void Start()
 {
     C  = FindObjectOfType <coilStats>();
     pS = FindObjectOfType <proceduralSpawning>();
     uS = FindObjectOfType <upgradeSystem>();
     numberOfEnemies = 0;
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     miniCoil.SetActive(!miniCoil.activeSelf);
     upgradeMenu.SetActive(!upgradeMenu.activeSelf);
     mS = FindObjectOfType <moneySystem>();
     gH = FindObjectOfType <gameHandler>();
     rb = GetComponent <Rigidbody2D>();
     C  = FindObjectOfType <coilStats>();
     pS = FindObjectOfType <proceduralSpawning>();
 }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        // Get Unity Components
        rb = GetComponent <Rigidbody2D>();
        pS = FindObjectOfType <proceduralSpawning>();

        // Periodic function for recharging the coil
        FunctionPeriodic.Create(() =>
        {
            energyRecharge();
        }, 0.1f);
    }