void OnDestroy()
 {
     if (butReq != null)
     {
         butReq.Activated -= this.ButtonClick;
         butReq            = null;
     }
 }
    // Use this for initialization
    void Start()
    {
        OriginPos = GetComponentInParent <Transform>().transform.localPosition;
        //GlobeLockPoint = Instantiate(node,new Vector3(transform.position.x, transform.position.y, transform.position.z), transform.rotation);
        //GlobeLockPoint.transform.position += GlobeLockPoint.transform.right * -1.08f;

        butReq = GetComponent <ButtonReq>();
        if (butReq != null)
        {
            butReq.Activated += this.ButtonClick;
        }

        mainButReq = mainBut.GetComponent <ButtonReq>();
        if (mainButReq != null)
        {
            mainButReq.Activated += this.ButtonClick;
        }

        audioReq = audioBut.GetComponent <ButtonReq>();
        if (audioReq != null)
        {
            audioReq.Activated += this.PlayAudioTrack;
        }
        vidReq = Vplayer.GetComponent <ButtonReq>();
        if (vidReq != null)
        {
            vidReq.Activated += this.VidButtonClick;
        }


        nexReq = fBut.GetComponent <ButtonReq>();
        if (nexReq != null)
        {
            nexReq.Activated += this.Nex;
        }
        prevReq = bBut.GetComponent <ButtonReq>();
        if (prevReq != null)
        {
            prevReq.Activated += this.Prev;
        }

        mediaX = 0;

        lenth = Media.Length;

        if (lenth == 0)
        {
            Vplayer.SetActive(false);
        }
        else if (lenth == 1)
        {
            bBut.SetActive(false);
            fBut.SetActive(false);
        }

        setup = true;
    }
    // Use this for initialization
    void Start()
    {
        butReq = GetComponent <ButtonReq>();
        if (butReq != null)
        {
            butReq.Activated += this.ButtonClick;
        }

        initialScale = transform.localScale;
    }
Exemple #4
0
    // Use this for initialization
    void Start()
    {
        ButReq = GetComponent <ButtonReq>();

        //glowMode = true;
        GetComponent <Outline>().OutlineWidth = 0;

        if (MapAnswer > 0)
        {
            glowMode = false;
        }
    }
    // Use this for initialization
    void Start()
    {
        hasDrawn     = true;
        bReq         = this.GetComponent <ButtonReq>();
        rend         = this.GetComponent <Renderer>();
        initialScale = transform.localScale;

        if (GetComponent <AudioSource>())
        {
            hasAudio = true;
        }
    }
    // Use this for initialization
    void Start()
    {
        initialScale = transform.localScale;

        butReq = GetComponent <ButtonReq>();
        if (butReq != null)
        {
            butReq.Activated += this.ButtonClick;
        }

        //GetComponentInChildren<TextMeshPro>().SetText(text);

        icon.GetComponent <Renderer>().material = iconPic[iconType];

        if (!isQuestion)
        {
            icon.SetActive(false);
            Tmpro.SetActive(false);
            bigIcon.SetActive(true);
            bigIcon.GetComponent <Renderer>().material = bigIconMat;
            GetComponent <Renderer>().enabled          = false;
        }
    }
Exemple #7
0
    // Use this for initialization
    void Start()
    {
        Current = this;
        i       = 1;
        tempi   = 5;

        TL1Req = timelineBut1.GetComponent <ButtonReq>();
        if (TL1Req != null)
        {
            TL1Req.Activated += this.TL1;
        }

        TL2Req = timelineBut2.GetComponent <ButtonReq>();
        if (TL2Req != null)
        {
            TL2Req.Activated += this.TL2;
        }

        TL3Req = timelineBut3.GetComponent <ButtonReq>();
        if (TL3Req != null)
        {
            TL3Req.Activated += this.TL3;
        }

        mVietReq = midVietBut.GetComponent <ButtonReq>();
        if (mVietReq != null)
        {
            mVietReq.Activated += this.TL1;
        }

        m19Req = mid1968But.GetComponent <ButtonReq>();
        if (m19Req != null)
        {
            m19Req.Activated += this.TL2;
        }

        menuReq = menuBut.GetComponent <ButtonReq>();
        if (menuReq != null)
        {
            menuReq.Activated += this.Menu;
        }

        helpReq = helpBut.GetComponent <ButtonReq>();
        if (helpReq != null)
        {
            helpReq.Activated += this.Help;
        }

        if (StaticHolder.Current != null)
        {
            if (StaticHolder.Current.TimelineState == 0)
            {
                TL3();
            }
            if (StaticHolder.Current.TimelineState == 1)
            {
                TL1();
            }
            else if (StaticHolder.Current.TimelineState == 2)
            {
                TL2();
            }
        }

        Hint.Current.index = 10;
        Hint.Current.gameObject.SetActive(true);
    }
 // Use this for initialization
 void Start()
 {
     bReq         = this.GetComponent <ButtonReq>();
     initialScale = transform.localScale;
 }
    void SetupReq()
    {
        //foreach(GameObject but in menuButton)

        /*
         * for (int i = 0; i < menuButton.Length; i++)
         * {
         *  butReq[i] = menuButton[i].GetComponent<ButtonReq>();
         *  if (butReq[i] != null)
         *  {
         *
         *      butReq[i].Activated += NewScene;
         *  }
         * }
         */
        i = 0;

        butReq[i] = menuButton[i].GetComponent <ButtonReq>();
        if (butReq[i] != null)
        {
            butReq[i].Activated += NewScene0;
        }
        i++;

        butReq[i] = menuButton[i].GetComponent <ButtonReq>();
        if (butReq[i] != null)
        {
            butReq[i].Activated += NewScene1;
        }

        i++;
        butReq[i] = menuButton[i].GetComponent <ButtonReq>();
        if (butReq[i] != null)
        {
            butReq[i].Activated += NewScene2;
        }

        backReq = backBut.GetComponent <ButtonReq>();
        if (backReq != null)
        {
            backReq.Activated += Close;
        }

        homeReq = homeBut.GetComponent <ButtonReq>();
        if (homeReq != null)
        {
            homeReq.Activated += Home;
        }

        hintReq = hintBut.GetComponent <ButtonReq>();
        if (hintReq != null)
        {
            hintReq.Activated += HintOpen;
        }

        quitReq = quitBut.GetComponent <ButtonReq>();
        if (quitReq != null)
        {
            quitReq.Activated += QuitGame;
        }
    }