private void build(int index) { Debug.Assert(platform is FatPlatform); FatPlatform fp = (FatPlatform)platform; if (fp.hasLane(index)) { if (fp.canRemoveLane(index)) { fp.removeLane(index); } else { MessageBox.Show("Could not be released due to an obstacle"); } //! MessageBox.Show("障害物があって解放できません"); } else { if (fp.canAddLane(index)) { fp.addLane(index); } else { MessageBox.Show("Could not be connected due to an obstacle"); } //! MessageBox.Show("障害物があって接続できません"); } updateDialog(); }
/// <summary> /// /// </summary> /// <param name="loc"></param> /// <returns></returns> public static Platform get(Location loc) { Platform p = FatPlatform.get(loc); if (p != null) { return(p); } // TODO: check slim platform return(ThinPlatform.get(loc)); }
private void updateDialog() { if (platform is FatPlatform) { FatPlatform fp = (FatPlatform)platform; if (!fp.hasLane(lIdx)) { left.Text = "Left connect"; } //! if(!fp.hasLane(lIdx)) left.Text = "左に接続"; else { left.Text = "Left release"; } //! else left.Text = "左を解放"; if (!fp.hasLane(rIdx)) { right.Text = "Right connect"; } //! if(!fp.hasLane(rIdx)) right.Text = "右に接続"; else { right.Text = "Right release"; } //! else right.Text = "右を解放"; } if (platform.host != null) { warning.Hide(); } else { warning.Show(); } }
/// <summary> /// /// </summary> /// <param name="v"></param> /// <param name="_owner"></param> /// <param name="_idx"></param> public RailRoadImpl(TrafficVoxel v, FatPlatform _owner, int _idx) : base(v, _owner, _idx) { }
public FatPlatformVoxel(FatPlatform p, Location loc, ISprite _sprite) : base(loc) { this.owner = p; this.sprite = _sprite; }
public FatPlatformVoxel(FatPlatform p, int x, int y, int z, ISprite _sprite) : this(p, new Location(x, y, z), _sprite) { }