public void Init(TankManager manager, TankDisplay display) { m_Manager = manager; m_TankDisplay = display; m_Collider = m_TankDisplay.GetComponent <BoxCollider>(); SetDefaults(); }
private void SetTankActive(bool active) { if (m_Collider == null && m_TankDisplay != null) { m_Collider = m_TankDisplay.GetComponent <BoxCollider>(); } if (m_Collider != null) { m_Collider.enabled = active; } m_TankDisplay.SetVisibleObjectsActive(active); m_AimCanvas.SetActive(active); if (active) { m_Manager.EnableControl(); } else { m_Manager.DisableControl(); } }