示例#1
0
 /// <summary>
 /// 旋转的回调函数
 /// </summary>
 /// <param id="newAngle"></param>
 public void CallbackSliderRotation(float newAngle)
 {
     if (cubeObject != null)
     {
         CubeEntity entity = entityUtils.GetEntity <CubeEntity>(cubeObject);
         entity.angle = newAngle;
     }
 }
示例#2
0
 /// <summary>
 /// 缩放回调函数
 /// </summary>
 /// <param id="newScaling"></param>
 public void CallbackSliderScaling(float newScaling)
 {
     if (cubeObject != null)
     {
         CubeEntity entity = entityUtils.GetEntity <CubeEntity>(cubeObject);
         entity.scale = newScaling;
     }
 }
示例#3
0
 /// <summary>
 /// 处理业务逻辑
 /// </summary>
 /// <param id="evt"></param>
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("angle"))
     {
         CubeEntity entity = utilsEntity.GetEntity <CubeEntity>(gameObject);
         transform.Rotate(0, entity.angle, 0, Space.Self);
         utilsLogging.Info(entity.angle.ToString());
         return;
     }
 }
 /// <summary>
 /// 处理业务逻辑
 /// </summary>
 /// <param id="evt"></param>
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("scale"))
     {
         CubeEntity entity = utilsEntity.GetEntity <CubeEntity>(gameObject);
         transform.localScale =
             new Vector3(
                 entity.scale,
                 entity.scale,
                 entity.scale
                 );
         utilsLogging.Info(entity.scale.ToString());
         return;
     }
 }