Inheritance: MonoBehaviour
Exemplo n.º 1
0
 public void DoRemoveWatcherLink(FWatcherLink watcherLink)
 {
     int watcherLinkCount = _watcherLinks.Count;
     for(int w = 0; w<watcherLinkCount; w++)
     {
         if(_watcherLinks[w] == watcherLink)
         {
             _watcherLinks.RemoveAt(w);
             return;
         }
     }
 }
Exemplo n.º 2
0
    public void DoRemoveWatcherLink(FWatcherLink watcherLink)
    {
        int watcherLinkCount = _watcherLinks.Count;

        for (int w = 0; w < watcherLinkCount; w++)
        {
            if (_watcherLinks[w] == watcherLink)
            {
                _watcherLinks.RemoveAt(w);
                return;
            }
        }
    }
Exemplo n.º 3
0
    public void DoWatch(object target, string targetName, bool shouldShowNonPublic)
    {
        int watcherLinkCount = _watcherLinks.Count;

        for (int w = 0; w < watcherLinkCount; w++)
        {
            if (_watcherLinks[w].GetTarget() == target)
            {
                return;                 //we already have a watcher for this target!
            }
        }

        GameObject linkGO = new GameObject(targetName);

        linkGO.transform.parent = _gameObject.transform;

        FWatcherLink link = linkGO.AddComponent <FWatcherLink>();

        link.Init(target, shouldShowNonPublic);

        _watcherLinks.Add(link);
    }
Exemplo n.º 4
0
    public FWatcherLinkMember(FWatcherLink link, MemberInfo memberInfo)
    {
        _link           = link;
        this.memberInfo = memberInfo;

        _propertyInfo = memberInfo as PropertyInfo;

        if (_propertyInfo != null)
        {
            name = _propertyInfo.Name;

            memberType = _propertyInfo.PropertyType;
        }
        else         //check if it's a field instead
        {
            _fieldInfo = memberInfo as FieldInfo;

            if (_fieldInfo != null)
            {
                name       = _fieldInfo.Name;
                memberType = _fieldInfo.FieldType;
            }
        }
    }
Exemplo n.º 5
0
 public static void RemoveWatcherLink(FWatcherLink watcherLink)
 {
     _instance.DoRemoveWatcherLink(watcherLink);
 }
Exemplo n.º 6
0
    public FWatcherLinkMember(FWatcherLink link, MemberInfo memberInfo)
    {
        _link = link;
        this.memberInfo = memberInfo;

        _propertyInfo = memberInfo as PropertyInfo;

        if(_propertyInfo != null)
        {
            name = _propertyInfo.Name;

            memberType = _propertyInfo.PropertyType;
        }
        else //check if it's a field instead
        {
            _fieldInfo = memberInfo as FieldInfo;

            if(_fieldInfo != null)
            {
                name = _fieldInfo.Name;
                memberType = _fieldInfo.FieldType;
            }
        }
    }
Exemplo n.º 7
0
 static public void RemoveWatcherLink(FWatcherLink watcherLink)
 {
     _instance.DoRemoveWatcherLink(watcherLink);
 }