Beispiel #1
0
 private void On_AlphaUI(EMEasingCallback p)
 {
     if (p.id == motionId)
     {
         cachedCanvasGroup.alpha = p.floatValue;
     }
 }
Beispiel #2
0
 private void On_RotateUI(EMEasingCallback p)
 {
     if (p.id == motionId)
     {
         cachedTransform.localRotation = Quaternion.Euler(p.vector3Value);
     }
 }
Beispiel #3
0
 private void On_ScaleUI(EMEasingCallback p)
 {
     if (p.id == motionId)
     {
         cachedTransform.localScale = p.vector3Value;
     }
 }
Beispiel #4
0
 private void On_MoveUI(EMEasingCallback p)
 {
     if (p.id == motionId)
     {
         cachedTransform.anchoredPosition = p.vector3Value;
     }
 }
Beispiel #5
0
    private void SendUpdate(float v1, float v2, float v3, float v4)
    {
        EMEasingCallback value = new EMEasingCallback();

        value.id = motionId;

        switch (variableType)
        {
        // float
        case VariableType.Float:
            if (!string.IsNullOrEmpty(updateCallBack))
            {
                value.floatValue = v1;
                target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver);
            }
            break;

        // Vector2
        case VariableType.V2:
            if (!string.IsNullOrEmpty(updateCallBack))
            {
                value.vector2Value = new Vector2(v1, v2);
                target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver);
            }
            break;

        // Vector3
        case VariableType.V3:
            if (!string.IsNullOrEmpty(updateCallBack))
            {
                value.vector3Value = new Vector3(v1, v2, v3);
                target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver);
            }
            break;

        // Color
        case VariableType.Color:
            if (!string.IsNullOrEmpty(updateCallBack))
            {
                value.colorValue = new Color(v1, v2, v3, v4);
                target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver);
            }
            break;
        }
    }
Beispiel #6
0
	private void SendUpdate(float v1, float v2, float v3,float v4){

		EMEasingCallback value = new EMEasingCallback();
		value.id = motionId;

		switch ( variableType){
			// float	
		case VariableType.Float:
			if (!string.IsNullOrEmpty(updateCallBack)){
				value.floatValue = v1;
				target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver);
			}
			break;
			// Vector2
		case VariableType.V2:
			if (!string.IsNullOrEmpty(updateCallBack)){
				value.vector2Value = new Vector2(v1,v2);
				target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver);
			}
			break;
			// Vector3
		case VariableType.V3:
			if (!string.IsNullOrEmpty(updateCallBack)){
				value.vector3Value = new Vector3(v1,v2,v3);
				target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver);
			}	
			break;
			// Color
		case VariableType.Color:
			if (!string.IsNullOrEmpty(updateCallBack)){
				value.colorValue = new Color(v1,v2,v3,v4);
				target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver);
			}	
			break;
		}
		
	}
Beispiel #7
0
	private void On_AlphaUI(EMEasingCallback p){
		if (p.id == motionId){
			cachedCanvasGroup.alpha = p.floatValue;
		}
	}
Beispiel #8
0
	private void On_ScaleUI(EMEasingCallback p){

		if (p.id == motionId){
			cachedTransform.localScale = p.vector3Value;
		}
	}
Beispiel #9
0
	private void On_RotateUI(EMEasingCallback p){
		if (p.id == motionId){
			cachedTransform.localRotation = Quaternion.Euler(p.vector3Value);
		}
	}
Beispiel #10
0
	private void On_MoveUI( EMEasingCallback p){
		if (p.id == motionId){
			cachedTransform.anchoredPosition = p.vector3Value;
		}
	}