Exemplo n.º 1
0
 public void SetUp()
 {
     position1 = new VRPosition(42, 42, 42);
     scale = new VRScale(100, 100);
     tree1 = new TreeViewModel(position1, 1);
     tree2 = new TreeViewModel(position1, 2);
 }
Exemplo n.º 2
0
 public void SetUp()
 {
     position1 = new VRPosition(42, 42, 42);
     scale = new VRScale(100, 100);
     building1 = new BuildingViewModel(position1, scale, 1);
     building2 = new BuildingViewModel(position1, scale, 2);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BuildingViewModel" /> class.
        /// </summary>
        /// <param name="pos">The position.</param>
        /// <param name="scale">The scale.</param>
        /// <param name="id">The identifier.</param>
        public BuildingViewModel(VRPosition pos, VRScale scale, int id)
        {
            Log.Logger.GetInstance().Warning("1scale = " + scale.Width);
            Log.Logger.GetInstance().Debug("new builView at (" + pos.X + ":" + pos.Y + ":" + pos.Rotation + ") with w=" + scale.Width + " and h=" + scale.Height);

            this.buildingModel = new BuildingModel(pos, scale, id);
            this.Model = this.buildingModel;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Creates the new building.
        /// </summary>
        /// <param name="position">The position.</param>
        /// <param name="scale">The scale.</param>
        /// <param name="id">The identifier.</param>
        /// <returns>
        /// the view-model of the building
        /// </returns>
        public BuildingViewModel CreateNewObject(VRPosition position, VRScale scale, int id)
        {
            BuildingView view = new BuildingView();
            Log.Logger.GetInstance().Warning("0scale = " + scale.Width);
            Log.Logger.GetInstance().Error("Building pos " + position.X + " " + position.Y);
            BuildingViewModel viewModel = new BuildingViewModel(position, scale, id);

            this.LinkMVVM(view, viewModel);
            return viewModel;
        }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BuildingModel" /> class.
 /// </summary>
 /// <param name="pos">The position.</param>
 /// <param name="scale">The scale.</param>
 /// <param name="id">The identifier.</param>
 public BuildingModel(VRPosition pos, VRScale scale, int id)
     : base(pos, scale, id)
 {
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractModel" /> class.
 /// </summary>
 /// <param name="pos">The position.</param>
 /// <param name="scale">The scale.</param>
 /// <param name="id">The identifier.</param>
 public AbstractModel(VRPosition pos, VRScale scale, int id)
 {
     this.Position = pos;
     this.Scale = scale;
     this.Id = id;
 }
Exemplo n.º 7
0
 public void SetUp()
 {
     position1 = new VRPosition(42, 42, 42);
     scale1 = new VRScale(SizeEnum.Unity.BuildingWidth(), SizeEnum.Unity.BuildingHeight());
     buildingModel = new BuildingModel(position1, scale1, 0);
 }