Example #1
0
        public Vector2 GetAbsolutePosition()
        {
            Vector2 vector = this.mTask.NodeData.Offset;

            if (this.parentNodeDesigner != null)
            {
                vector += this.parentNodeDesigner.GetAbsolutePosition();
            }
            if (BehaviorDesignerPreferences.GetBool(BDPreferences.SnapToGrid))
            {
                vector.Set(BehaviorDesignerUtility.RoundToNearest(vector.x, 10f), BehaviorDesignerUtility.RoundToNearest(vector.y, 10f));
            }
            return(vector);
        }