Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        mInstance = this;

        audioRing = ringBoard.GetComponent <AudioSource>();
        clipRing  = ringBoard.GetComponent <AudioSource>().clip;

        audioDoo = cellPhone.transform.GetComponent <AudioSource>();
        clipDoo  = cellPhone.transform.GetComponent <AudioSource>().clip;

        BGMAudio = BGM.GetComponent <AudioSource>();
        BGMClip  = BGM.GetComponent <AudioSource>().clip;
        Debug.Log(BGMAudio);

        SE          = knifeObj.GetComponent <AudioSource>();
        Hallelu     = holy.GetComponent <AudioSource>().clip;
        snowMan     = knifeObj.GetComponent <AudioSource>().clip;
        sadFaceClip = glass.GetComponent <AudioSource>().clip;
        cut         = booth.GetComponent <AudioSource>().clip;
        cameraClip  = teleHouse.GetComponent <AudioSource>().clip;

        flash_ = flash.transform.GetComponent <Animation>();

        BGMAudio.Play();

        //传递用钩子测试
        Router.TR1         = TR1;
        Router.TR2         = TR2;
        Router.ED2         = ED2;
        Router.GameSetting = Setting;
    }
Exemplo n.º 2
0
    public void Initialize(Dimension d)
    {
        sceneManager = GameObject.Find("DrawingCanvas").GetComponent <Scene2Manager> ();

        foreach (Transform t in transform)
        {
            if (t.name == "Header")
            {
                headerSection = t;
            }
            if (t.name == "SliderUI")
            {
                sliderUI = t;
            }
        }
        foreach (Transform t in headerSection)
        {
            if (t.name == "Name")
            {
                name_text = t.GetComponentsInChildren <Text> ()[0];
            }
            if (t.name == "Value")
            {
                value_text = t.GetComponentsInChildren <Text> ()[0];
            }
        }
        foreach (Transform t in sliderUI)
        {
            if (t.name == "Slider")
            {
                slider = t.GetComponent <Slider> ();
            }
        }

        dim             = d;
        name_text.text  = dim.name;
        value_text.text = dim.minVal.ToString();
        slider.maxValue = dim.GetRes();
    }