Guest User

SquishToPsuedoBody2DAdapter

a guest
Jun 12th, 2016
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. /// <summary>
  4. /// Changes the offset for the PsuedoBody2D by the squish scale.
  5. /// </summary>
  6. public class SquishToPsuedoBody2DAdapter : MonoBehaviour
  7. {
  8.     public PsuedoBody2D PsuedoBody;
  9.     public Scaler Scale;
  10.  
  11.     void Update()
  12.     {
  13.         PsuedoBody.PositionOffsetScale = Scale.CurrentScale;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment