public JScaleByState(JScaleTo action, GameObject target) : base(action, target) { DeltaX = StartScaleX * EndScaleX - StartScaleX; DeltaY = StartScaleY * EndScaleY - StartScaleY; DeltaZ = StartScaleZ * EndScaleZ - StartScaleZ; }
public JScaleToState(JScaleTo action, GameObject target) : base(action, target) { if (target == null) { return; } StartScaleX = target.transform.localScale.x; StartScaleY = target.transform.localScale.y; StartScaleZ = target.transform.localScale.z; EndScaleX = action.EndScaleX; EndScaleY = action.EndScaleY; EndScaleZ = action.EndScaleZ; DeltaX = EndScaleX - StartScaleX; DeltaY = EndScaleY - StartScaleY; DeltaZ = EndScaleZ - StartScaleZ; }