public override void Create()
        {
            Nodes       = new ObjectListValue("Nodes", typeof(Path3DNode));
            TravelSpeed = new FloatValue("Travel Speed", 1);

#if EDITOR && WINDOWS
            if (ParentLevel.LevelForEditing)
            {
                this.AddRightClickEvent("Add Node", AddNode);
                AddTag(GameObjectTag._3DForward);
                Nodes.ChangeEvent = NodeChange;
            }
#endif
            base.Create();
        }
Esempio n. 2
0
        public virtual void OnDestroy()
        {
            ObjectValue.ClearObject(this);
            ObjectListValue.ClearObject(this);

            if (hierarchyParent != null)
            {
                hierarchyParent.RemoveHierarchyObject(this);
            }

            foreach (Value v in Values)
            {
                v.Destroy();
            }
        }
        public override void Create()
        {
            NodeFile      = new StringValue("Node File");
            ConnectorFile = new StringValue("Conector File");

            Nodes             = new ObjectListValue("Nodes", typeof(WallNode));
            Nodes.ChangeEvent = NodeChange;

            Load();

#if EDITOR && WINDOWS
            if (ParentLevel.LevelForEditing)
            {
                this.AddRightClickEvent("Add Node", AddNode);
                AddTag(GameObjectTag._2DForward);
            }
#endif

            AddTag(GameObjectTag.Update);

            base.Create();
        }
        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;
     }
 }