コード例 #1
0
ファイル: UICursor.cs プロジェクト: Nagraal/Tactile-Engine
 internal UICursor(UINodeSet <T> nodes)
 {
     NodeSet = nodes;
     if (NodeSet.Any() && NodeSet.ActiveNode != null)
     {
         force_loc(NodeSet.ActiveNode.loc);
     }
 }
コード例 #2
0
ファイル: UICursor.cs プロジェクト: Nagraal/Tactile-Engine
        public void UpdateTargetLoc(Vector2 scrollOffset = default(Vector2))
        {
            if (NodeSet.Any() && NodeSet.ActiveNode != null)
            {
                Vector2 loc = NodeSet.ActiveNode.loc - scrollOffset;
                if (this.target_loc != loc)
                {
                    set_loc(loc);
                }
            }

            if (Input.ControlScheme != ControlSchemes.Buttons)
            {
                move_to_target_loc();
            }
        }