예제 #1
0
        public NebulaObject(IBaseWorld iWorld, string id, byte type,
                            Dictionary <byte, object> inTags, float size, int subZone, params Type[] components)
        {
            Id           = id;
            Type         = type;
            world        = iWorld;
            tags         = inTags;
            this.size    = size;
            this.subZone = subZone;
            if (tags == null)
            {
                tags = new Dictionary <byte, object>();
            }

            behaviours = new BehaviourCollection();

            transform  = AddComponent <NebulaTransform>();
            properties = AddComponent <NebulaObjectProperties>();
            properties.SetProperty((byte)PS.Invisibility, invisible);
            //properties.SetProperty((byte)PS.SubZoneID, subZone);
            properties.SetProperty((byte)PS.Badge, string.Empty);

            if (components != null && components.Length > 0)
            {
                foreach (var component in components)
                {
                    AddComponent(component);
                }
            }
        }
예제 #2
0
 public NebulaObject(IBaseWorld iWorld, string id, byte type, Dictionary <byte, object> inTags,
                     float size, int subZone, BehaviourCollection behaviours)
 {
     Id           = id;
     Type         = type;
     world        = iWorld;
     tags         = inTags;
     this.size    = size;
     this.subZone = subZone;
     if (tags == null)
     {
         tags = new Dictionary <byte, object>();
     }
     this.behaviours = behaviours;
     transform       = GetComponent <NebulaTransform>();
     properties      = GetComponent <NebulaObjectProperties>();
     properties.SetProperty((byte)PS.Invisibility, invisible);
     UpdateNebulaObject();
 }
예제 #3
0
 public NebulaObject(IBaseWorld iWorld, Dictionary <byte, object> inTags, float size, int subZone, params Type[] components)
     : this(iWorld, Guid.NewGuid().ToString(), inTags, size, subZone, components)
 {
 }
예제 #4
0
 public NebulaObject(IBaseWorld iWorld, string id, Dictionary <byte, object> inTags, float size, int subZone, params Type[] components)
     : this(iWorld, id, (byte)ItemType.Avatar, inTags, size, subZone, components)
 {
 }
예제 #5
0
 public TestNebulaObject(IBaseWorld world, Dictionary <byte, object> tags, float size, int subZone, params Type[] components)
     : base(world, tags, size, subZone, components)
 {
 }