コード例 #1
0
    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);
                    }
                }
            }
        }
    }
コード例 #2
0
 private void Awake()
 {
     if (gameManager == null)
     {
         gameManager = FindObjectOfType <GameManager>();
     }
     if (missaoController == null)
     {
         missaoController = FindObjectOfType <MissaoController>();
     }
 }
コード例 #3
0
    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);
        }
    }
コード例 #4
0
 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";
         }
     }
 }