Exemplo n.º 1
0
 public void Update()
 {
     if (!Application.isPlaying)
     {
         lossyScale = TSVector.Abs(transform.lossyScale.ToTSVector());
     }
 }
Exemplo n.º 2
0
        /**
         *  @brief Creates a new {@link TSRigidBody} when there is no one attached to this GameObject.
         **/
        public void Awake()
        {
            tsTransform = this.GetComponent <TSTransform2D>();
            tsRigidBody = this.GetComponent <TSRigidBody2D>();

            if (lossyScale == TSVector.one)
            {
                lossyScale = TSVector.Abs(transform.localScale.ToTSVector());
            }
        }