コード例 #1
0
        protected override void _GetInterfaces(PatternMatch typeMatch, PatternMatch nameMatch, List<TorqueInterface> list)
        {
            if (typeMatch.TestMatch("float"))
            {
                for (int i = 0; i < Count; i++)
                {
                    if (nameMatch.TestMatch(_forces[i].Name))
                        list.Add(_forceInstances[i]._strength);
                }
            }

            base._GetInterfaces(typeMatch, nameMatch, list);
        }
コード例 #2
0
        protected override void _GetInterfaces(PatternMatch typeMatch, PatternMatch nameMatch, List<TorqueInterface> list)
        {
            if (typeMatch.TestMatch("float"))
            {
                SList<LinkPoint> walk = _linkPoints;
                while (walk != null)
                {
                    if (walk.Val.Name != null && walk.Val.Rotation != null && nameMatch.TestMatch(walk.Val.Name))
                    {
                        if (walk.Val.Rotation.Owner == null)
                            Owner.RegisterInterface(this, walk.Val.Rotation);
                        list.Add(walk.Val.Rotation);
                    }
                    walk = walk.Next;
                }
            }
            else if (typeMatch.TestMatch("vector2"))
            {
                SList<LinkPoint> walk = _linkPoints;
                while (walk != null)
                {
                    if (walk.Val.Name != null && walk.Val.Position != null && nameMatch.TestMatch(walk.Val.Name))
                    {
                        if (walk.Val.Position.Owner == null)
                            Owner.RegisterInterface(this, walk.Val.Position);
                        list.Add(walk.Val.Position);
                    }
                    walk = walk.Next;
                }
            }

            base._GetInterfaces(typeMatch, nameMatch, list);
        }