Exemplo n.º 1
0
Arquivo: thePlot.cs Projeto: BXZR/GAL
    //其余元素的初始化,有些初始化只应该在剧本树建立完成之后做
    //在这个方法里面初始化各种控制单元
    void makeValueStart()
    {
        theTextController   = this.GetComponent <textController> ();  //文本控制单元
        theChoiceController = this.GetComponent <choiceController>(); //分支选择控制单元
        theUIController     = this.GetComponent <UIController>();     //非文本显示的UI控制单元

        //theMusicController =  this.transform .GetComponentInChildren<MusicController> ();//音频比较特殊,需要父子关系,因为需要同时播放多个音效,音乐
        theMusicController       = this.GetComponent <AudioGetter>().GetMusicController();
        theSoundController       = this.transform.GetComponentsInChildren <soundController>()[0];   //两个sound,一个是真的音效,一个是语音音效
        thePeopleSoundController = this.transform.GetComponentsInChildren <soundController>()[1];   //两个sound,一个是真的音效,一个是语音音效
        theDataController        = this.GetComponent <saveLoadController>();
    }
Exemplo n.º 2
0
    void Start()
    {
        currentScene = SceneManager.GetActiveScene();
        sceneName    = currentScene.name;
        choiceColl   = GetComponent <BoxCollider2D> ();
        choiceRend   = GetComponent <SpriteRenderer> ();
        _choice      = this;

        if (Hide.Contains(this.gameObject.transform.parent.name))
        {
            choiceRend.color = new Color(255, 255, 255, 0);
        }
    }
Exemplo n.º 3
0
 //初始化
 //这个过程只可以在控制器里面执行,并且最好只可以执行一次
 public void  makeStart(choiceController theCotrollerIn)
 {
     this.theController = theCotrollerIn;
     theShowText        = this.GetComponentInChildren <Text> ();
 }