Inheritance: IBaseObject
Exemplo n.º 1
0
 public PropertyIntChange(BaseObject ob, PropertyID propertyID, int value)
     : base(ob, propertyID)
 {
     this.Value = value;
 }
Exemplo n.º 2
0
 public ObjectDestructedChange(BaseObject ob)
     : base(ob)
 {
 }
Exemplo n.º 3
0
 protected PropertyChange(BaseObject ob, PropertyID propertyID)
     : base(ob)
 {
     this.PropertyID = propertyID;
 }
Exemplo n.º 4
0
 protected ObjectChange(BaseObject ob)
 {
     this.Object = ob;
 }
Exemplo n.º 5
0
 public ObjectCreatedChange(BaseObject ob)
     : base(ob)
 {
 }
Exemplo n.º 6
0
 public ObjectCreatedChange(BaseObject ob)
     : base(ob)
 {
 }
Exemplo n.º 7
0
        /// <summary>
        /// Does the player see location p in object ob
        /// </summary>
        public bool Sees(BaseObject ob, IntPoint3 p)
        {
            if (m_seeAll)
                return true;

            var env = ob as EnvironmentObject;
            if (env != null)
            {
                IVisionTracker tracker = GetVisionTracker(env);
                return tracker.Sees(p);
            }

            /* is it inside one of the controllables? */
            var lgo = ob as ConcreteObject;
            while (lgo != null)
            {
                if (m_controllables.Contains(lgo))
                    return true;

                lgo = lgo.Parent as ConcreteObject;
            }

            return false;
        }
Exemplo n.º 8
0
 public bool IsController(BaseObject living)
 {
     return(m_controllables.Contains(living));
 }
Exemplo n.º 9
0
        public ObjectVisibility GetObjectVisibility(BaseObject ob)
        {
            if (m_seeAll)
                return ObjectVisibility.All;

            switch (ob.ObjectType)
            {
                case ObjectType.Item:
                case ObjectType.Living:
                    {
                        var mo = (MovableObject)ob;

                        for (MovableObject o = mo; o != null; o = o.Parent as MovableObject)
                        {
                            if (this.IsController(o))
                            {
                                // if this player is the controller of the object or any of the object's parent
                                return ObjectVisibility.All;
                            }
                        }

                        if (Sees(mo.Parent, mo.Location))
                            return ObjectVisibility.Public
                                | ObjectVisibility.Debug; // XXX debug also
                        else
                            return ObjectVisibility.None;
                    }

                case ObjectType.Environment:
                    return ObjectVisibility.All;

                default:
                    throw new Exception();
            }
        }
Exemplo n.º 10
0
 public PropertyIntChange(BaseObject ob, PropertyID propertyID, int value)
     : base(ob, propertyID)
 {
     this.Value = value;
 }
Exemplo n.º 11
0
 public PropertyStringChange(BaseObject ob, PropertyID propertyID, string value)
     : base(ob, propertyID)
 {
     this.Value = value;
 }
Exemplo n.º 12
0
 public PropertyValueChange(BaseObject ob, PropertyID propertyID, ValueType value)
     : base(ob, propertyID)
 {
     this.Value = value;
 }
Exemplo n.º 13
0
 protected PropertyChange(BaseObject ob, PropertyID propertyID)
     : base(ob)
 {
     this.PropertyID = propertyID;
 }
Exemplo n.º 14
0
 public ObjectDestructedChange(BaseObject ob)
     : base(ob)
 {
 }
Exemplo n.º 15
0
 public PropertyStringChange(BaseObject ob, PropertyID propertyID, string value)
     : base(ob, propertyID)
 {
     this.Value = value;
 }
Exemplo n.º 16
0
 public bool IsController(BaseObject living)
 {
     return m_controllables.Contains(living);
 }
Exemplo n.º 17
0
 public PropertyValueChange(BaseObject ob, PropertyID propertyID, ValueType value)
     : base(ob, propertyID)
 {
     this.Value = value;
 }
Exemplo n.º 18
0
 protected ObjectChange(BaseObject ob)
 {
     this.Object = ob;
 }