Пример #1
0
 public void Update()
 {
     if (!Application.isPlaying)
     {
         lossyScale = TSVector.Abs(transform.lossyScale.ToTSVector());
     }
 }
Пример #2
0
        /**
         *  @brief Creates a new {@link TSRigidBody} when there is no one attached to this GameObject.
         **/
        public void Awake()
        {
            tsTransform = this.GetComponent <TSTransform>();
            tsRigidBody = this.GetComponent <TSRigidBody>();

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