Exemple #1
0
 private void DiscardReferenceValue()
 {
     if (RefValue != null)
     {
         RefValue.RemoveReference(this);
         RefValue = null;
     }
 }
Exemple #2
0
        public void Load(string Path)
        {
            this.Path = Path;
            if (!Path.Equals("") && ParentValue != null)
            {
                DiscardReferenceValue();
                Value = AssetManager.Load <TextureCube>(Path);

                if (Value == null)
                {
                    RefValue = ParentValue.Parent.GetParent().getTextureCube(Path);
                    if (RefValue == null)
                    {
                        RefValue = ParentValue.Parent.ParentLevel.getTextureCube(Path);
                    }

                    if (RefValue != null)
                    {
                        RefValue.AddReference(this);
                    }
                }
            }
        }