/// <summary> /// Unity Method /// </summary> private void Awake() { CubeDataModelEntity entity = new CubeDataModelEntity(); this.DataEntity = entity; Watch(this); }
/// <summary> /// 接收Slider组建的值变化事件 /// </summary> /// <param name="value"></param> public void OnSliderValueChanged(float value) { CubeDataModelEntity entity = (CubeDataModelEntity)FindObjectOfType <CubeRotaionTrigger>().DataEntity; entity.RotateSpeed = value; }