public override bool Equals(object obj) { // If parameter is null return false. if (obj == null) { return(false); } // If parameter cannot be cast to Point return false. Object3D so = obj as Object3D; if ((System.Object)so == null) { return(false); } // Return true if the fields match: return(ID == so.ID); }
private void reFormMap() { defaultTile = new GreenTiles(); defaultTile.LoadContent(); defaultTile.parent = this; defaultTile.dimension = dimension; tiles = new Object3D[length, width]; for (int i = 0; i < length; i++) { for (int j = 0; j < width; j++) { Object3D tile = defaultTile.Clone(); tile.position.X = (-length / 2 + i) * gridSpacing; tile.position.Z = (-width / 2 + j) * gridSpacing; tile.angle.Y = MathHelper.ToRadians(Global.random.Next(0, 3) * 90); tiles[i, j] = tile; } } }
/// <summary> /// Constantly face an offset from the given object. /// with no roll. /// </summary> /// <param name="o">The object to face.</param> /// <param name="offset">The offset from the object.</param> public virtual void Track(Object3D o, Vector3 offset) { this.offset = offset; focus = o; state = STATE_TRACK_OBJ; }
/// <summary> /// Constantly face the given object with no roll. /// </summary> /// <param name="o">The object to face.</param> public virtual void Track(Object3D o) { offset = Vector3.Zero; focus = o; state = STATE_TRACK_OBJ; }
/// <summary> /// Face the absolute position of an object with an offset. /// </summary> /// <param name="o">The object to face.</param> /// <param name="offset">Face this absolute position from the object.</param> public virtual void Face(Object3D o, Vector3 offset) { this.offset = offset; focus = o; state = STATE_FACE_OBJ; }
/// <summary> /// Face the absolute position of an object. /// </summary> /// <param name="o">The object to face.</param> public virtual void Face(Object3D o) { offset = Vector3.Zero; focus = o; state = STATE_FACE_OBJ; }
public void AddTransparent(Object3D o) { o.dimension = this; Transparencies.Add(o); }
public void AddOverlay(Object3D o) { o.dimension = this; Overlays.Add(o); }
public override void Add(Object3D o) { o.dimension = this; base.Add(o); }
public void ControlFree(Object3D o) { controlObject = o; ControlMode = ControlModes.Free; }