Esempio n. 1
0
        internal Script(bool flag) : base()
        {
            _displayName     = "Script";
            _icon            = "16/script.png";
            _instances       = new UISafeObservableCollection <Instance>();
            _allowedChildren = new List <Type>();

            Initialize();
        }
Esempio n. 2
0
        public Script() : base()
        {
            _displayName     = "Script";
            _icon            = "16/script.png";
            _instances       = new UISafeObservableCollection <Instance>();
            _allowedChildren = new List <Type>();
            parent           = ActiveScene.Context.ActiveWorld.World;

            Initialize();
        }
Esempio n. 3
0
File: World.cs Progetto: ext0/Flex
        internal World(bool flag) : base()
        {
            _displayName     = "World";
            _instances       = new UISafeObservableCollection <Instance>();
            _icon            = "16/world.png";
            _allowedChildren = new List <Type>();
            _allowedChildren.Add(typeof(Instance));
            _isRoot = true;

            Initialize();
        }
Esempio n. 4
0
 public ActiveWorld()
 {
     if (_activeWorld != null)
     {
         throw new Exception("Multiple active worlds initialized! Only one active world object should exist!");
     }
     _activeWorld = this;
     _instances   = new UISafeObservableCollection <Instance>();
     _world       = new World(true);
     _instances.Add(_world);
     _sky = new Sky(true);
     _instances.Add(_sky);
     _camera = new Camera(true);
 }
Esempio n. 5
0
File: Part.cs Progetto: ext0/Flex
        internal Part(bool flag) : base()
        {
            _displayName     = "Part";
            _icon            = "16/brick.png";
            _instances       = new UISafeObservableCollection <Instance>();
            _allowedChildren = new List <Type>();
            _allowedChildren.Add(typeof(Instance));

            _anchored   = true;
            _collisions = true;
            _material   = Properties.Material.GRASS;

            Initialize();
        }
Esempio n. 6
0
        internal Camera(bool flag) : base()
        {
            _displayName     = "Camera";
            _icon            = "Legacy/camera.png";
            _instances       = new UISafeObservableCollection <Instance>();
            _allowedChildren = new List <Type>();

            //Strange setup, but we have to ChangeParent before we set to isRoot

            ChangeParent(ActiveWorld.Active.World);
            _isRoot = true;

            Initialize();
        }
Esempio n. 7
0
File: Part.cs Progetto: ext0/Flex
        public Part() : base()
        {
            _displayName     = "Part";
            _icon            = "16/brick.png";
            _instances       = new UISafeObservableCollection <Instance>();
            _allowedChildren = new List <Type>();
            _allowedChildren.Add(typeof(Instance));

            _anchored   = true;
            _collisions = true;
            _material   = Properties.Material.GRASS;

            parent = ActiveScene.Context.ActiveWorld.World;

            Initialize();
        }
Esempio n. 8
0
        internal Sky(bool flag) : base()
        {
            _displayName     = "Sky";
            _icon            = "Legacy/weather_cloudy.png";
            _instances       = new UISafeObservableCollection <Instance>();
            _allowedChildren = new List <Type>();
            _isRoot          = true;
            _ambient         = new ColorProperty(220, 220, 220, 255);
            _shadowColor     = new ColorProperty(140, 140, 140, 255);
            _diffuseColor    = new ColorProperty(0, 0, 0);
            _specularColor   = new ColorProperty(0, 0, 0);
            _sunDirection    = new Properties.Vector3(0.02f, -.94f, -.03f);
            _sunDirection.PropertyChanged += SunDirectionPropertyChanged;

            Initialize();
        }