void Start() { if (mc == null) { mc = FindObjectOfType <MissaoController>(); } if (objetoInterativo == null) { objetoInterativo = this.gameObject; } if (GameManager.gameMode.Equals(GameMode.VR)) { gameObject.GetComponent <SphereCollider>().enabled = false; } else { gameObject.GetComponent <SphereCollider>().enabled = true; if (mc != null) { if (mc.carregarMissaoController) { if (this.gameObject.layer == 10) { this.gameObject.SetActive(false); } } } } }
private void Awake() { if (gameManager == null) { gameManager = FindObjectOfType <GameManager>(); } if (missaoController == null) { missaoController = FindObjectOfType <MissaoController>(); } }
public void Start() { if (mc == null) { mc = FindObjectOfType <MissaoController>(); if (mc == null) { //Debug.LogError("Missao Controller Nao encontrado"); this.gameObject.SetActive(false); return; } } mapaMissoes = mc.mapaMissao; if (mapaMissoes != null) { mapaMissoes.SetActive(false); } }
public void AtivarMissoes() { if (mc == null) { mc = (MissaoController)FindObjectOfType(typeof(MissaoController)); //mc = FindObjectOfType<MissaoController>(); } if (mc != null) { mc.GetComponent <MissaoController>().AtivarMissao(); if (mc.carregarMissaoController) { txt_BotaoMissao.text = "Desativar Missões"; } else { txt_BotaoMissao.text = "Ativar Missões"; } } }