Esempio n. 1
0
    private void OnTriggerEnter(Collider other)
    {
        int playerMask = (int)Mathf.Floor(Mathf.Log(LayerMask.GetMask("PlayerLayer"), 2f));

        if (other.gameObject.CompareTag("Player"))
        {
            tankBuffControl TKBController = other.gameObject.GetComponent <tankBuffControl>();
            TKBController.APFSDSEnhancement();
            Destroy(gameObject);
        }
    }
Esempio n. 2
0
    void CloakEngage()
    {
        if (Input.GetButton(m_CloakButton) && m_CloakCooling <= 0f)
        {
            Debug.Log("CloakEngage!!!");
            tankBuffControl tankBuff = gameObject.GetComponent <tankBuffControl>();
            StartCoroutine(tankBuff.CloakEngage());
            m_CloakCooling = m_CloakEngageCoolDown;
        }

        if (m_CloakCooling > 0)
        {
            m_CloakCooling -= m_DecreaseFactor * Time.deltaTime;
        }
    }