Пример #1
0
 public override void Create()
 {
     MyEffect = new EffectValue("Effect", "SkyBox", EffectHolderType.Basic3D);
     Load();
     base.Create();
     AddTag(GameObjectTag._3DBackground);
 }
        public override void Create()
        {
            AddTag(GameObjectTag._3DDeferredWorldLighting);

            UseShadows             = new BoolValue("Use Shadows");
            UseShadows.ChangeEvent = ShadowChange;

            RealtimeShadows             = new BoolValue("Real Time Shadows");
            RealtimeShadows.ChangeEvent = RealtimeChange;

            ShadowMapSize             = new FloatValue("Shadow Map CellSize", 256);
            ShadowMapSize.ChangeEvent = ShadowChange;

            MyEffect = new EffectValue("CommandPoint Effect", "Deferred/PointLightNoShadows", EffectHolderType.DeferredLight);

            Load();
            base.Create();

            CreateCameras();

#if EDITOR && WINDOWS
            if (ParentLevel.LevelForEditing)
            {
                AddTag(GameObjectTag._3DForward);
                ApplyScale(Vector3.One * 200, Vector3.Zero, false);
            }
#endif
        }
Пример #3
0
 public virtual void AddConstructEffect(EffectValue v)
 {
     if (!ConstructEffects.Contains(v))
     {
         ConstructEffectsNeeded = true;
         ConstructEffects.AddFirst(v);
     }
 }
Пример #4
0
        public override void Create()
        {
            MyModel  = new ModelValue("Model");
            MyEffect = new EffectValue("Effect", EffectHolderType.Basic3D);

            AddTag(GameObjectTag._3DDepthOver);
            base.Create();
        }
Пример #5
0
 public static void DrawModel(Model model, EffectValue effect, Camera3D camera, Basic3DObject obj)
 {
     if (model != null && effect.get() != null)
     {
         _3DEffect effect3D = (_3DEffect)effect.Holder;
         effect3D.SetFromObject(obj);
         effect3D.SetFromCamera(camera);
         DrawModel(model, effect3D.MyEffect);
     }
 }
Пример #6
0
        public override void Create()
        {
            CastShadow = new BoolValue("Cast Shadow", ClickShadow);

            UseDeferred = new BoolValue("Deferred Pass", ClickDeferred);
            MyModel     = new ModelValue("Model");
            MyEffect    = new EffectValue("Effect", EffectHolderType.Deferred3D);

            AddTag(GameObjectTag._3DForward);
            base.Create();
        }
Пример #7
0
        public override void Create()
        {
            model  = new ModelValue("Model");
            effect = new EffectValue("Effect", EffectHolderType.Lit3D);

            AmbientLightColor = new ColorValue("Ambient Light Color", new Vector4(0.5f, 0.5f, 0.5f, 1), 0.2f);
            LightOneDirection = new Vector3Value("Light One Direction", Vector3.One);
            LightOneColor     = new ColorValue("Light One Color", new Vector4(1, 0.9f, 0.85f, 1));
            LightTwoDirection = new Vector3Value("Light Two Direction", new Vector3(-1, 1, -1));
            LightTwoColor     = new ColorValue("Light Two Color", new Vector4(0.1f, 0.3f, 0.65f, 1));

            base.Create();

            AddTag(GameObjectTag._3DForward);
        }
        public override void Create()
        {
#if EDITOR && WINDOWS
            this.AddRightClickEvent("Add Emitter", AddEmitter);
#endif
            Emitters = new ObjectListValue("Emitters", typeof(ParticleEmitter));
            MaxParticles = new IntValue("MaxParticles", 50, CreateArray);
            Additive = new BoolValue("Additive", true);
            UseDepth = new BoolValue("Use Depth", true);
            MinVelocity = new Vector2Value("Min Velocity");
            MaxVelocity = new Vector2Value("Max Velocity", Vector2.One);
            MyEffect = new EffectValue("Effect","ParticleEffect", EffectHolderType.Deferred3D);
            ParticleDuration = new FloatValue("ParticleDuration", 10);
            ParticleDuration.ChangeEvent = DurationChange;
            MaxParticles.ChangeEvent = MaxChange;
            MyEffect.ChangeEvent = EffectChange;
            CreateArray();

            AddTag(GameObjectTag._3DDepthOver);
            AddTag(GameObjectTag.Update);
            base.Create();
        }
 public static void DummyRead(byte ByteType, BinaryReader Reader)
 {
     switch (ByteType)
     {
         case 0: BoolValue.DummyRead(Reader); break;
         case 1: ColorValue.DummyRead(Reader); break;
         case 2: EffectValue.DummyRead(Reader); break;
         case 3: FloatValue.DummyRead(Reader); break;
         case 4: ModelValue.DummyRead(Reader); break;
         case 5: ObjectValue.DummyRead(Reader); break;
         case 6: SpriteFontValue.DummyRead(Reader); break;
         case 7: StringValue.DummyRead(Reader); break;
         case 8: Texture2DValue.DummyRead(Reader); break;
         case 9: TextureCubeValue.DummyRead(Reader); break;
         case 10: Vector2Value.DummyRead(Reader); break;
         case 11: Vector3Value.DummyRead(Reader); break;
         case 12: Vector4Value.DummyRead(Reader); break;
         case 13: ObjectListValue.DummyRead(Reader); break;
         case 14: IntValue.DummyRead(Reader); break;
         case 15: EventValue.DummyRead(Reader); break;
         case 16: TypeValue.DummyRead(Reader); break;
     }
 }
Пример #10
0
 public override void Create()
 {
     AddTag(GameObjectTag._3DDeferredOverLighting);
     MyEffect = new EffectValue("Effect", "Deferred/AmbientLight", EffectHolderType.None);
     base.Create();
 }
Пример #11
0
 public static void DrawModel(ModelValue model, EffectValue effect, Camera3D camera, Basic3DObject obj)
 {
     DrawModel(model.get(), effect, camera, obj);
 }
Пример #12
0
 public override void Create()
 {
     AddTag(GameObjectTag._3DDeferredOverLighting);
     MyEffect = new EffectValue("Directional Effect", "Deferred/DirectionalLight", EffectHolderType.DeferredLight);
     base.Create();
 }