예제 #1
0
 public void Update()
 {
     if (!Application.isPlaying)
     {
         lossyScale = FPVector.Abs(transform.lossyScale.ToFPVector());
     }
 }
예제 #2
0
        /**
         *  @brief Creates a new {@link FPRigidBody} when there is no one attached to this GameObject.
         **/
        public void Awake()
        {
            FPTransform = this.GetComponent <FPTransform2D>();
            FPRigidBody = this.GetComponent <FPRigidBody2D>();

            if (lossyScale == FPVector.one)
            {
                lossyScale = FPVector.Abs(transform.localScale.ToFPVector());
            }
        }