// Use this for initialization void Start() { // if( Application.isEditor ) { m_HideCursor = false; } if( m_BtnCloseScene == null ) { Debug.LogError("The 'BtnCloseScene' has not assigned!",this); return; } if( string.IsNullOrEmpty(m_LevelParent) ) { Debug.LogError("The 'LevelParent' must not null or empty",this); return; } // if (m_SpriteHandLeft == null) { Debug.LogError("The 'SpriteHandLeft' has not assigned!",this); return; } if (m_SpriteHandRight == null) { Debug.LogError("The 'SpriteHandRight' has not assigned!",this); return; } if ( m_SpriteCursorLoading == null ) { Debug.LogError("The 'SpriteCursorLoading' has not assigned!",this); return; } // if( m_OrbitCamera == null ) m_OrbitCamera = Camera.main.GetComponent<OrbitCamera>(); // if( m_OrbitCamera == null ) { Debug.LogError( "The OrbitCamera has not assigned.", this ); return; } if( m_WidgetMore == null ) { Debug.LogError( "The 'WidgetMore' has not assigned.", this ); return; } if(CKinect.KinectServices.Instance == null) { CKinect.KinectServices.Create(m_SpriteHandLeft,m_SpriteHandRight,m_SpriteCursorLoading); } else if(CKinect.CursorController.Instance != null) { CKinect.CursorController.Instance.SpriteHandLeft = m_SpriteHandLeft; CKinect.CursorController.Instance.SpriteHandRight = m_SpriteHandRight; CKinect.CursorController.Instance.SpriteCursorLoading = m_SpriteCursorLoading; } //UIEventListener.Get(m_BtnCloseScene.gameObject).onClick = this.OnBtnCloseSceneClick; EventDelegate.Add(m_AutoToggle.onChange,this.AutoPlayChange); // if( m_HideCursor ) Screen.showCursor = !m_HideCursor; StartCoroutine( DelayInit() ); }
// private void Awake() { // s_Instance = this; }