Exemple #1
0
 public void ButtonAppear(float timeout) // Implementasyona dahil et.
 {
     TurretButtonsListeners.CloseAllRanges();
     _turretRange.SetActive(true);
     CancelInvoke(nameof(ButtonDisappear)); // Hasar alirsa timer'i 0'lamak icin bunu yaptik.
     Invoke(nameof(ButtonDisappear), timeout);
 }
Exemple #2
0
    private void TurretClicked()  // Dinamik bi sekilde tekrar yaz.
    {
        if (!TurretButtonsListeners.turretControlModeOn)
        {
            TurretButtonsListeners.CloseAllTurretButtons();
            _switchGunsButton.gameObject.SetActive(!SwitchGun.switchGunMode);
            _buttonsGameObj.SetActive(!_buttonsGameObj.activeSelf);
        }

        ButtonAppear(rangeDisappearTimeout);
    }
    private bool redScreenIsWorking = false; // Kirmizi ekran suanda aktifmi

    public void Start()
    {
        redScreen = GameObject.FindGameObjectWithTag("Screens").transform.GetChild(0).GetComponent <Image>();  //Screenin içindeki sprite renderiri alır.
        _turretButtonsListeners = GameObject.FindGameObjectWithTag("CommonScripts").GetComponent <TurretButtonsListeners>();
        _trashCan = GameObject.FindGameObjectWithTag("Buttons").transform.GetChild(0).gameObject;

        _tileMapsGameObj = new List <GameObject>
        {
            GameObject.FindGameObjectWithTag("TileMaps").transform.GetChild(1).gameObject,
            GameObject.FindGameObjectWithTag("TileMaps").transform.GetChild(2).gameObject
        };
    }