public void child_references_to_parent()
        {
            var scope = new ScopeCollection <int>();

            ScopeBase <int> child = scope.GetChild();

            Assert.AreSame(scope, child.Parent);
        }
Пример #2
0
 void Awake()
 {
     fireMech    = GetComponent <FireMechanism>();
     ammoSys     = GetComponent <AmmoSystem>();
     recoil      = GetComponent <RecoilBase>();
     scopeStatus = GetComponent <IScopeStatus>();
     scope       = GetComponent <ScopeBase>();
     reloadable  = GetComponent <IReloadable>();
 }
Пример #3
0
 private void AddToListByType(ScopeBase scopebase, int type)
 {
     if (type == 0)
     {
         AllSettings.Current.SiteSettings.ScopeList.Add(scopebase);
     }
     else
     {
         AllSettings.Current.RegisterSettings.ScopeList.Add(scopebase);
     }
 }
Пример #4
0
        private void AddToListByType(ScopeBase scopebase,int type)
        {
            if(type==0)
            {
                AllSettings.Current.SiteSettings.ScopeList.Add(scopebase);
            }
            else
            {
                AllSettings.Current.RegisterSettings.ScopeList.Add(scopebase);
            }

        }
Пример #5
0
 public FileScope(String name, ScopeBase parent) : base(parent) => Name = name;
Пример #6
0
 public NamedScope(ScopeBase parent) : base(parent)
 {
 }
Пример #7
0
 public AnonymousScope(ScopeBase parent) : base(parent)
 {
 }
Пример #8
0
 protected ScopeBase(TValue value)
 {
     this.parent = Top;
     this.Value  = value;
     Top         = this;
 }