public static void SetEulerAngles(this Transform @this, Vector3 newValue, ChangeTypeEnum changeTypeTransform, AxisCombined axisCombined = AxisCombined.XYZ) { if (@this) { Vector3 eulerAngles = @this.eulerAngles; @this.eulerAngles = Vector3Extend.ChangeVector(eulerAngles, newValue, changeTypeTransform, axisCombined); } }
public static Vector3 Get(AxisCombined axis) { return(axisDictonary != null ? axisDictonary[axis] : default);
// tween for the transform scale /// <param name = "transform">The transform container</param> /// <param name = "timeOrVelocity">the time of tween</param> /// <param name = "isAutoKill">Does the tween have to destroy itself when it ends?</param> /// <param name = "AxisCombined">the spcific axis for changes</param> /// <param name = "functionEnum">the function to soften the tween</param> /// <param name = "values">The values that the tween must reach</param> public static TweenContainer ScaleTween(this Transform transform, float timeOrVelocity, bool isAutoKill, AxisCombined axisCombined, FunctionEnum functionEnum, ChangeModes changeMode, params Vector3[] values) { if (transform == null) { return(null); } void SetNewValue(Vector4 newValue) { if (transform != null) { transform.SetScale(newValue, ChangeTypeEnum.Modify, axisCombined); } else { LogManager.LogWarning("The tween is is referring to object that is not exist", "Tween"); } } Vector4 GetInitValue() { if (transform != null) { return(transform.localScale); } else { LogManager.LogWarning("The tween is is referring to object that is not exist", "Tween"); return(default);
public AxisUtility(string inputString, AxisCombined axisEnum) { this.inputString = inputString; this.axisEnum = axisEnum; }
// tween for the transform scale /// <param name = "transform">The transform container</param> /// <param name = "timeOrVelocity">the time of tween</param> /// <param name = "isAutoKill">Does the tween have to destroy itself when it ends?</param> /// <param name = "AxisCombined">the spcific axis for changes</param> /// <param name = "values">The values that the tween must reach</param> public static TweenContainer ScaleTween(this Transform transform, float timeOrVelocity, bool isAutoKill, AxisCombined axisCombined, ChangeModes changeMode, params Vector3[] scaleVectors) { return(ScaleTween(transform, timeOrVelocity, isAutoKill, axisCombined, FunctionEnum.EaseIn_Quadratic, changeMode, scaleVectors)); }