Пример #1
0
        // ---------------------------------------------------------------------
        //
        // Public
        //
        // ---------------------------------------------------------------------

        public void FixTransform()
        {
            var iso_world        = isoWorld;
            var cached_transform = FixCachedTransform();

            if (iso_world && cached_transform)
            {
                cached_transform.position = IsoUtils.Vec3ChangeZ(
                    iso_world.IsoToScreen(position),
                    cached_transform.position.z);
                FixScreenBounds();
                MartDirtyIsoWorld();
            }
        }
Пример #2
0
		public void FixTransform() {
		#if UNITY_EDITOR
			if ( !Application.isPlaying && isAlignment ) {
				_position = tilePosition;
			}
		#endif
			if ( isoWorld ) {
				transform.position = IsoUtils.Vec3ChangeZ(
					isoWorld.IsoToScreen(position),
					transform.position.z);
				FixScreenRect();
			}
			FixLastProperties();
			MartDirtyIsoWorld();
		}
Пример #3
0
 public Vector3 ScreenToIso(Vector2 pos, float iso_z)
 {
     return(IsoUtils.Vec3ChangeZ(
                ScreenToIso(new Vector2(pos.x, pos.y - iso_z * tileHeight)),
                iso_z));
 }
Пример #4
0
		void PlaceIsoObject(IsoObject iso_object, float depth) {
			var trans = iso_object.transform;
			trans.position = IsoUtils.Vec3ChangeZ(trans.position, depth);
		}