// --------------------------------------------------------------------- // // 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(); } }
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(); }
public Vector3 ScreenToIso(Vector2 pos, float iso_z) { return(IsoUtils.Vec3ChangeZ( ScreenToIso(new Vector2(pos.x, pos.y - iso_z * tileHeight)), iso_z)); }
void PlaceIsoObject(IsoObject iso_object, float depth) { var trans = iso_object.transform; trans.position = IsoUtils.Vec3ChangeZ(trans.position, depth); }