Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        availablePoint = 10;
        gridLayout     = transform.parent.GetComponentInParent <GridLayout>();
        CS             = GetComponent <CharacterStats>();
        Debug.Log(string.Format("{0} is coming", CS.characterName));


        //find everything
        apText = GameObject.Find("Text").GetComponent <Text>();

        map      = GameObject.Find("generateMap").GetComponent <tilegenerate>();
        rMap     = GameObject.Find("routeMap").GetComponent <Tilemap>();
        GH       = GameObject.Find("gameHandler").GetComponent <gameHandler>();
        SL       = GameObject.Find("gameHandler").GetComponent <skillList>();
        heartbar = GameObject.Find("heart");

        //placing x and y to initial point in formation and check availability
        width  = map.tmpSize.x;
        height = map.tmpSize.y;
        //cellPosition = new Vector3Int(y,x, 0);

        //placing character(should be written at generate player)
        //transform.position = gridLayout.CellToWorld(cellPosition);
        map.updateFog();
    }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     gH = FindObjectOfType <gameHandler>();
     StartCoroutine(waitSpawner());
     dayNumber       = 1;
     difficultyIndex = 0;
 }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        instance = this;

        //if (Camera.main.GetComponent<CameraShaker> () == null)
        //Camera.main.gameObject.AddComponent<CameraShaker> ();

        deadPlayers = 0;
    }
Exemple #4
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>();
 }
Exemple #5
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);
    }
Exemple #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 > airplaneAggroPosStart) && (rb.position.x < airplaneAggroPosEnd))
                {
                    airplaneAggro();
                }

                else if (rb.position.x > 12)
                {
                    destroyAirplane();
                }
            }
        }, 60 / airplaneFireRate);
    }
Exemple #7
0
 // Start is called before the first frame update
 void Start()
 {
     GH      = GetComponent <gameHandler>();
     players = GH.players;
 }