예제 #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()
 {
     C  = FindObjectOfType <coilStats>();
     rb = GetComponent <Rigidbody2D>();
     tB = FindObjectOfType <tankBehaviour>();
     tankSlowedSpeed = tankSpeed * C.coilSlowRate;
 }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     C  = FindObjectOfType <coilStats>();
     rb = GetComponent <Rigidbody2D>();
     aB = FindObjectOfType <airplaneBehaviour>();
     airplaneSlowedSpeed = airplaneSpeed * C.coilSlowRate;
 }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     C  = FindObjectOfType <coilStats>();
     rb = GetComponent <Rigidbody2D>();
     sB = FindObjectOfType <soldierBehaviour>();
     soldierSlowedSpeed = soldierSpeed * C.coilSlowRate;
 }
예제 #5
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>();
 }
예제 #6
0
    // Start is called before the first frame update
    void Start()
    {
        mS     = FindObjectOfType <moneySystem>();
        gH     = FindObjectOfType <gameHandler>();
        rb     = GetComponent <Rigidbody2D>();
        Import = FindObjectOfType <GameObject>();
        C      = FindObjectOfType <coilStats>();

        FunctionPeriodic.Create(() =>
        {
            if (rb != null)
            {
                if (rb.position.x > tankAggroPos)
                {
                    tankAggro();
                }
            }
        }, 60f / tankFireRate);
    }
예제 #7
0
    // Start is called before the first frame update
    void Start()
    {
        mS     = FindObjectOfType <moneySystem>();
        gH     = FindObjectOfType <gameHandler>();
        rb     = GetComponent <Rigidbody2D>();
        Import = FindObjectOfType <GameObject>();
        C      = FindObjectOfType <coilStats>();

        FunctionPeriodic.Create(() =>
        {
            if (rb != null)
            {
                if ((rb.position.x > airplaneAggroPosStart) && (rb.position.x < airplaneAggroPosEnd))
                {
                    airplaneAggro();
                }

                else if (rb.position.x > 12)
                {
                    destroyAirplane();
                }
            }
        }, 60 / airplaneFireRate);
    }
예제 #8
0
 // Start is called before the first frame update
 void Start()
 {
     C = FindObjectOfType <coilStats>();
 }