コード例 #1
0
ファイル: CloudControl.cs プロジェクト: devwithu/Unity_006757
    // ================================================================ //
    // MonoBehaviour에서 상속.

    void    Start()
    {
        this.main_camera = GameObject.Find("Main Camera").GetComponent <CameraControl>();

        // ------------------------------------------------------------ //
        // 입과 눈.

        this.mouths = new List <GameObject>();
        this.eyes   = new List <GameObject>();

        this.face        = this.transform.FindChild("face").gameObject;
        this.face_center = this.face.transform.localPosition.z;

        // 입.

        Transform mouth_root = this.face.transform.FindChild("mouth");

        for (int i = 0; i < (int)MOUTH_TYPE.NUM; i++)
        {
            this.mouths.Add(null);

            Transform t = mouth_root.FindChild("mouth" + i);

            if (t == null)
            {
                continue;
            }

            this.mouths[i] = t.gameObject;
        }

        this.change_mouth_type(this.mouth_type);

        // 눈.

        for (int i = 0; i < (int)EYE_TYPE.NUM; i++)
        {
            this.eyes.Add(null);

            Transform t = this.face.transform.FindChild("eye" + i);

            if (t == null)
            {
                continue;
            }

            this.eyes[i] = t.gameObject;
        }

        this.eye_type    = EYE_TYPE.OPEN;
        this.blink_timer = 0.0f;
        this.change_eye_type();

        // ------------------------------------------------------------ //

        this.cloud_root = GameObject.Find("Game Root").GetComponent <CloudRoot>();

        this.timer = 0.0f;
    }
コード例 #2
0
ファイル: CloudControl.cs プロジェクト: kjhsch0326/006757
    // ================================================================ //
    // MonoBehaviour에서 상속.
    void Start()
    {
        this.main_camera = GameObject.Find("Main Camera").GetComponent<CameraControl>();

        // ------------------------------------------------------------ //
        // 입과 눈.

        this.mouths = new List<GameObject>();
        this.eyes   = new List<GameObject>();

        this.face = this.transform.FindChild("face").gameObject;
        this.face_center = this.face.transform.localPosition.z;

        // 입.

        Transform	mouth_root = this.face.transform.FindChild("mouth");

        for(int i = 0;i < (int)MOUTH_TYPE.NUM;i++) {

            this.mouths.Add(null);

            Transform	t = mouth_root.FindChild("mouth" + i);

            if(t == null) {

                continue;
            }

            this.mouths[i] = t.gameObject;
        }

        this.change_mouth_type(this.mouth_type);

        // 눈.

        for(int i = 0;i < (int)EYE_TYPE.NUM;i++) {

            this.eyes.Add(null);

            Transform	t = this.face.transform.FindChild("eye" + i);

            if(t == null) {

                continue;
            }

            this.eyes[i] = t.gameObject;
        }

        this.eye_type    = EYE_TYPE.OPEN;
        this.blink_timer = 0.0f;
        this.change_eye_type();

        // ------------------------------------------------------------ //

        this.cloud_root = GameObject.Find("Game Root").GetComponent<CloudRoot>();

        this.timer = 0.0f;
    }