504 lines
22 KiB
C#
504 lines
22 KiB
C#
using UnityEngine;
|
||
using RuntimeData;
|
||
using Animancer;
|
||
|
||
|
||
namespace Logic
|
||
{
|
||
public class GridRenderer
|
||
{
|
||
private MapData _mapData;
|
||
private Main _main;
|
||
private GameObject _ROGrid;
|
||
private uint _gridId;
|
||
private bool _cityWallMark = false;
|
||
|
||
//-------- 表现层数据Rdata --------//
|
||
public bool IsSelectHighlight = false;
|
||
public bool IsMoveHighlight = false;
|
||
|
||
//-------- Update缓存数据 --------//
|
||
private GridData _gridData;
|
||
private bool _freeland;
|
||
private CityData _cityData;
|
||
private PlayerData _playerData;
|
||
|
||
private GameObject _land,
|
||
_mountain,
|
||
_forest,
|
||
_road,
|
||
_resource,
|
||
_cityBuilding,
|
||
_cityWall,
|
||
_fog,
|
||
_borderUpLeft,
|
||
_borderUpRight,
|
||
_borderDownLeft,
|
||
_borderDownRight,
|
||
_selectHighlight,
|
||
_moveHighlight,
|
||
_effect;
|
||
|
||
public int x, y;
|
||
string forcesName, civName;
|
||
bool needBounce = false, isBounceDown = true;
|
||
Vector3 bounceUpPos, bounceDownPos;
|
||
float bounceTime = 0f;
|
||
float bounceDownFullTime = 0.07f;
|
||
float bounceUpFullTime = 0.2f;
|
||
|
||
public AnimationClip FogEffectAnim;
|
||
bool _playFogEffect = false;
|
||
bool _isPlayingFog = false;
|
||
|
||
bool renderVeteran = false;
|
||
|
||
// Start is called before the first frame update
|
||
public GridRenderer(GameObject prefab,Transform father, uint gridId, MapData mapData, Main main)
|
||
{
|
||
_mapData = mapData;
|
||
_main = main;
|
||
_gridId = gridId;
|
||
mapData.GridMap.GetGridDataByGid(_gridId,out _gridData);
|
||
_freeland = !_mapData.GetCityDataByTerritoryGid(_gridId,out _cityData);
|
||
if(!_freeland)
|
||
_mapData.GetPlayerDataByCityId(_cityData.Id,out _playerData);
|
||
if (!(_cityData == null) && !(_playerData == null))
|
||
{
|
||
_mapData.GridMap.GetGridDataByGid(gridId, out var g1);
|
||
}
|
||
Vector3 tpos = Table.Instance.GridToWorld(_gridData);
|
||
_ROGrid = GameObject.Instantiate(prefab,tpos, Quaternion.identity, father);
|
||
Init(_gridData);
|
||
}
|
||
|
||
public GameObject GetROGrid() { return _ROGrid; }
|
||
|
||
public void Update()
|
||
{
|
||
_mapData.GridMap.GetGridDataByGid(_gridId,out _gridData);
|
||
_freeland = !_mapData.GetCityDataByTerritoryGid(_gridId,out _cityData);
|
||
if(!_freeland)
|
||
_mapData.GetPlayerDataByCityId(_cityData.Id,out _playerData);
|
||
|
||
_ROGrid.transform.Find("Effect/Fire").gameObject.SetActive(false);
|
||
//判断是否着火
|
||
if (_mapData.GetCityDataByGid(_gridId,out var city) && _mapData.GetUnitDataByGid(_gridId,out var unit))
|
||
if (_mapData.GetPlayerDataByCityId(city.Id, out var player1) &&
|
||
_mapData.GetPlayerDataByUnitId(unit.Id, out var player2))
|
||
if(player1.Id != player2.Id)
|
||
_ROGrid.transform.Find("Effect/Fire").gameObject.SetActive(true);
|
||
|
||
|
||
|
||
//判断各自是否要bounce
|
||
if (needBounce)
|
||
{
|
||
if (isBounceDown)
|
||
{
|
||
bounceTime += Time.deltaTime / bounceDownFullTime;
|
||
_ROGrid.transform.position = Vector3.Lerp(bounceUpPos, bounceDownPos, bounceTime);
|
||
if (bounceTime >= 1f)
|
||
{
|
||
isBounceDown = false;
|
||
bounceTime = 0f;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
bounceTime += Time.deltaTime / bounceUpFullTime;
|
||
_ROGrid.transform.position = Vector3.Lerp(bounceDownPos, bounceUpPos, bounceTime);
|
||
if (bounceTime >= 1f)
|
||
needBounce = false;
|
||
|
||
}
|
||
|
||
}
|
||
|
||
if (_playFogEffect)
|
||
{
|
||
_playFogEffect = false;
|
||
PlayFogEffect();
|
||
}
|
||
|
||
if (_gridData.RenderMark)
|
||
{
|
||
_gridData.RenderMark = false;
|
||
RenderUpdateGridWithoutCityBuilding();
|
||
}
|
||
|
||
if (_gridData.CityBuildingRenderMark)
|
||
{
|
||
_gridData.CityBuildingRenderMark = false;
|
||
RenderUpdateCityBuilding(_cityData.Id);
|
||
}
|
||
}
|
||
|
||
public void Init(GridData t)
|
||
{
|
||
x = (int)t.Pos.X;
|
||
y = (int)t.Pos.Y;
|
||
//Vector3 pos = transform.position;
|
||
//pos.z = GridData.pos.x + GridData.pos.y;
|
||
//transform.position = pos;
|
||
_land = _ROGrid.transform.Find("Land").gameObject;
|
||
_road = _ROGrid.transform.Find("Road").gameObject;
|
||
_mountain = _ROGrid.transform.Find("Mountain").gameObject;
|
||
_forest = _ROGrid.transform.Find("Forest").gameObject;
|
||
_road = _ROGrid.transform.Find("Road").gameObject;
|
||
_resource = _ROGrid.transform.Find("Resource").gameObject;
|
||
_cityBuilding = _ROGrid.transform.Find("cityBuilding").gameObject;
|
||
_cityWall = _ROGrid.transform.Find("cityWall").gameObject;
|
||
_fog = _ROGrid.transform.Find("Fog").gameObject;
|
||
_borderUpLeft = _ROGrid.transform.Find("BorderUpLeft").gameObject;
|
||
_borderUpRight = _ROGrid.transform.Find("BorderUpRight").gameObject;
|
||
_borderDownLeft = _ROGrid.transform.Find("BorderDownLeft").gameObject;
|
||
_borderDownRight = _ROGrid.transform.Find("BorderDownRight").gameObject;
|
||
_selectHighlight = _ROGrid.transform.Find("SelectHighlight").gameObject;
|
||
_moveHighlight = _ROGrid.transform.Find("MoveHighlight").gameObject;
|
||
_effect = _ROGrid.transform.Find("Effect").gameObject;
|
||
|
||
civName = Table.Instance.QueryCivsName(_gridData.CivId);
|
||
UpdateLand();
|
||
UpdateRoad();
|
||
UpdateForest();
|
||
UpdateMountain();
|
||
UpdateResource();
|
||
UpdateCityWall();
|
||
UpdateFog();
|
||
|
||
FogEffectAnim = Resources.Load<AnimationClip>("Animations/VFX/PlayFog");
|
||
|
||
//UpdateBorder();fog自带updateborder
|
||
}
|
||
|
||
public void RenderUpdateGridWithoutCityBuilding()
|
||
{
|
||
UpdateLand();
|
||
UpdateRoad();
|
||
UpdateMountain();
|
||
UpdateForest();
|
||
UpdateResource();
|
||
UpdateCityWall();
|
||
UpdateFog();
|
||
//UpdateBorder();fog自带updateborder
|
||
}
|
||
public void RenderUpdateCityBuilding(uint cityId)
|
||
{
|
||
PlayFogEffect();
|
||
_mapData.CityMap.GetCityById(cityId,out CityData cityData);
|
||
_mapData.GetPlayerDataByCityId(cityId, out PlayerData playerData);
|
||
uint civId = playerData.PlayerCivId;
|
||
int citylevel = cityData.Level;
|
||
int houseEdge = Table.Instance.cityLevel2HouseEdge[citylevel];
|
||
int houseSize = houseEdge * houseEdge;
|
||
int houseCount = Table.Instance.cityLevel2HouseNumber[citylevel];
|
||
int houseHeight = Table.Instance.cityLevel2HouseHeight[citylevel];
|
||
int[] housePosHeight = new int[houseSize];
|
||
int[,] textureType = new int[houseHeight, houseCount];
|
||
|
||
for (int k = 0; k < houseSize; k++)
|
||
{
|
||
for (int l = 0; l < houseHeight; l++)
|
||
textureType[l, k] = 0; //初始化
|
||
housePosHeight[k] = 1;
|
||
textureType[0, k] = Random.Range(0, Table.Instance.cityLevel2HouseType[citylevel]);
|
||
}
|
||
for (int k = houseSize; k < houseCount; k++)
|
||
{
|
||
int randPos = Random.Range(0, houseSize);
|
||
if (housePosHeight[randPos] >= houseHeight)
|
||
for (randPos = houseSize - 1; randPos >= 0; randPos--)
|
||
if (housePosHeight[randPos] < houseHeight)
|
||
break;
|
||
textureType[housePosHeight[randPos]++, randPos] = Random.Range(0, Table.Instance.cityLevel2HouseType[citylevel]);
|
||
}
|
||
|
||
//清空原来的城市图像
|
||
foreach (UnityEngine.Transform child in _cityBuilding.transform)
|
||
Object.Destroy(child.gameObject);
|
||
|
||
//开始设置城市图像
|
||
for (int x = 0; x < houseEdge; x++)
|
||
for (int y = 0; y < houseEdge; y++)
|
||
for (int z = 0; z < housePosHeight[x * houseEdge + y]; z++)
|
||
{
|
||
GameObject house = new GameObject($"house{x}_{y}_{z}");
|
||
SpriteRenderer sr = house.AddComponent<SpriteRenderer>();
|
||
string forcesName = Table.Instance.QueryForcesName(playerData.PlayerForceId);
|
||
string civName = Table.Instance.QueryCivsName(playerData.PlayerCivId);
|
||
//Debug.Log($"ArtResources/TH1Buildings/TH1Buildings{forcesName}/{civName}/{forcesName}_{civName}_House_{z + 1}");
|
||
sr.sprite = Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1Buildings{forcesName}/{civName}/{forcesName}_{civName}_House_{z + 1}");
|
||
house.transform.parent = _cityBuilding.transform;
|
||
Vector3 tpos = _ROGrid.transform.position;
|
||
tpos = new Vector3(tpos.x + 1.22f * (x - y),
|
||
tpos.y + 0.7f * (x + y) + z * 1.6f - 8.32f + 0.7f * (4 - houseEdge),
|
||
tpos.z + 0.9f - (30 + z - x - y) * 0.001f);
|
||
house.transform.position = tpos;
|
||
}
|
||
|
||
}
|
||
|
||
public void RenderUpdataHighlight()
|
||
{
|
||
_moveHighlight.SetActive(IsMoveHighlight);
|
||
_selectHighlight.SetActive(IsSelectHighlight);
|
||
}
|
||
|
||
public void SetSelectHighlight(bool v)
|
||
{
|
||
if (IsSelectHighlight == v)
|
||
return;
|
||
IsSelectHighlight = v;
|
||
_main.MapRenderer.HighlightGridIdSet.Add(_gridId);
|
||
_main.MapRenderer.HighlightGridIdSetRenderMark = true;
|
||
}
|
||
|
||
public void SetMoveHighlight(bool v)
|
||
{
|
||
if (IsMoveHighlight == v)
|
||
return;
|
||
IsMoveHighlight = v;
|
||
_main.MapRenderer.HighlightGridIdSet.Add(_gridId);
|
||
_main.MapRenderer.HighlightGridIdSetRenderMark = true;
|
||
}
|
||
public void UpdateLand()
|
||
{
|
||
if (_gridData.Terrain == TerrainType.Land)
|
||
_land.GetComponent<SpriteRenderer>().sprite =
|
||
Resources.Load<Sprite>($"ArtResources/TH1Grounds/TH1Ground_{civName}");
|
||
else
|
||
{
|
||
if (_gridData.Terrain == TerrainType.ShallowSea)
|
||
_land.GetComponent<SpriteRenderer>().sprite =
|
||
Resources.Load<Sprite>($"ArtResources/TH1Waters/TH1Water_Water");
|
||
else
|
||
_land.GetComponent<SpriteRenderer>().sprite =
|
||
Resources.Load<Sprite>($"ArtResources/TH1Waters/TH1Water_Ocean");
|
||
}
|
||
}
|
||
|
||
public void UpdateRoad()
|
||
{
|
||
//如果当前的feature没有road
|
||
if (_gridData.Feature != TerrainFeature.Road)
|
||
return;
|
||
|
||
//如果当前的feature是在海上
|
||
if (_gridData.Terrain != TerrainType.Land)
|
||
return;
|
||
|
||
for (int dir = 1; dir <= 9; dir++)
|
||
{
|
||
//int tx = (_gridData.Pos.X) + i % 3 - 1, ty = (_gridData.Pos.Y) + i / 3 - 1;
|
||
var t = _road.transform.Find($"Road{dir}");
|
||
if (_mapData.CheckIfNearByGridRoadCanConnenct(_gridData,dir))
|
||
{
|
||
if (t == null)
|
||
{
|
||
GameObject road = new GameObject($"Road{dir}");
|
||
SpriteRenderer sr = road.AddComponent<SpriteRenderer>();
|
||
sr.sprite = Resources.Load<Sprite>($"ArtResources/TH1Miscs/TH1Misc_Road{dir - 1}");
|
||
road.transform.parent = _road.transform;
|
||
road.transform.localPosition = new Vector3(0, 0, 0);
|
||
}
|
||
}
|
||
else
|
||
{
|
||
if (t != null)
|
||
GameObject.Destroy(t);
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
public void UpdateMountain()
|
||
{
|
||
_mountain.GetComponent<SpriteRenderer>().sprite = _gridData.Feature == TerrainFeature.Mountain
|
||
? Resources.Load<Sprite>($"ArtResources/TH1Mountains/TH1Mountain_{civName}")
|
||
: null;
|
||
}
|
||
|
||
public void UpdateForest()
|
||
{
|
||
_forest.GetComponent<SpriteRenderer>().sprite = _gridData.Vegetation == Vegetation.Trees
|
||
? Resources.Load<Sprite>($"ArtResources/TH1Forests/TH1Forest_{civName}")
|
||
: null;
|
||
}
|
||
|
||
|
||
public void UpdateResource( bool bridgeMirror = false)
|
||
{
|
||
if(!_freeland)
|
||
forcesName = Table.Instance.QueryForcesName(_playerData.PlayerForceId);
|
||
|
||
string needGlow = "";
|
||
if (!_freeland && _playerData.Id == _mapData.PlayerMap.SelfPlayerData.Id
|
||
&& (_gridData.Resource == ResourceType.Fruit &&
|
||
_playerData.TechTree.CheckIfHasTech(TechType.Organization)
|
||
|| (_gridData.Resource == ResourceType.Animal &&
|
||
_playerData.TechTree.CheckIfHasTech(TechType.Hunting))
|
||
|| (_gridData.Resource == ResourceType.Fish &&
|
||
_playerData.TechTree.CheckIfHasTech(TechType.Fishing))
|
||
|| (_gridData.Resource == ResourceType.Crop &&
|
||
_playerData.TechTree.CheckIfHasTech(TechType.Farming))
|
||
|| (_gridData.Resource == ResourceType.Metal &&
|
||
_playerData.TechTree.CheckIfHasTech(TechType.Mining))))
|
||
needGlow = "_glow";
|
||
if (_gridData.Resource == ResourceType.Starfish && _mapData.PlayerMap.SelfPlayerData.TechTree.CheckIfHasTech(TechType.Navigation))
|
||
needGlow = "_glow";
|
||
|
||
bool hasCity = _mapData.GetCityDataByTerritoryGid(_gridId, out var cityData);
|
||
|
||
var res = _gridData.Resource switch
|
||
{
|
||
ResourceType.Crop => Resources.Load<Sprite>($"ArtResources/TH1Miscs/TH1Misc_Crop{needGlow}"),
|
||
ResourceType.Metal => Resources.Load<Sprite>($"ArtResources/TH1Miscs/TH1Misc_Metal{needGlow}"),
|
||
ResourceType.Fish => Resources.Load<Sprite>($"ArtResources/TH1Miscs/TH1Misc_Fish{needGlow}"),
|
||
ResourceType.Animal => Resources.Load<Sprite>($"ArtResources/TH1Animals/TH1Animal_{civName}{needGlow}"),
|
||
ResourceType.Fruit => Resources.Load<Sprite>($"ArtResources/TH1Fruits/TH1Fruit_{civName}{needGlow}"),
|
||
ResourceType.CityCenter => hasCity ? null : Resources.Load<Sprite>($"ArtResources/TH1Miscs/TH1Misc_Tribe"),
|
||
ResourceType.Treasure => Resources.Load<Sprite>($"ArtResources/TH1Miscs/TH1Misc_Treasure"),
|
||
ResourceType.Starfish => Resources.Load<Sprite>($"ArtResources/TH1Miscs/TH1Misc_Starfish{needGlow}"),
|
||
ResourceType.Temple => Resources.Load<Sprite>($"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Temple"),
|
||
ResourceType.ForestTemple => Resources.Load<Sprite>($"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_ForestTemple"),
|
||
ResourceType.MountainTemple => Resources.Load<Sprite>($"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_MountainTemple"),
|
||
ResourceType.WaterTemple => Resources.Load<Sprite>($"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_WaterTemple"),
|
||
ResourceType.Farm => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Farm"),
|
||
ResourceType.Mine => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Mine"),
|
||
ResourceType.LumberHut => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_LumberHut"),
|
||
ResourceType.Port => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Port"),
|
||
ResourceType.Bridge => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Bridge{(bridgeMirror ? ("Mirror") : (""))}"),
|
||
ResourceType.Windmill => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Windmill_{Mathf.Min(_gridData.buildingLevel, 8)}"),
|
||
ResourceType.Forge => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Forge_{Mathf.Min(_gridData.buildingLevel, 8)}"),
|
||
ResourceType.Sawmill => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Sawmill_{Mathf.Min(_gridData.buildingLevel, 8)}"),
|
||
ResourceType.Market => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Market_{Mathf.Min(_gridData.buildingLevel, 8)}"),
|
||
ResourceType.Wonder => Table.Instance.GridAndResourceDataAssets.GetWonderSprite(_gridData.Wonder,_playerData),
|
||
ResourceType.Tower => Resources.Load<Sprite>(
|
||
$"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_Tower"),
|
||
_ => null
|
||
};
|
||
if (_resource.GetComponent<SpriteRenderer>().sprite != res)
|
||
{
|
||
_resource.GetComponent<SpriteRenderer>().sprite = res;
|
||
if(needGlow != "_glow")
|
||
PlayFogEffect();
|
||
}
|
||
}
|
||
|
||
public void UpdateCityWall()
|
||
{
|
||
if (_cityWall.activeSelf)
|
||
return;
|
||
if (!_mapData.GetCityDataByGid(_gridId, out var cityData))
|
||
return;
|
||
if (!cityData.CityWall)
|
||
return;
|
||
_cityWallMark = true;
|
||
_cityWall.SetActive(true);
|
||
}
|
||
|
||
public void UpdateBorder()
|
||
{
|
||
//如果不是城市领土,不需要生成border
|
||
if (_freeland)
|
||
{
|
||
_borderDownLeft.SetActive(false);
|
||
_borderDownRight.SetActive(false);
|
||
_borderUpLeft.SetActive(false);
|
||
_borderUpRight.SetActive(false);
|
||
return;
|
||
}
|
||
_borderDownLeft.SetActive(!_mapData.CheckIfNearByGridSamePlayer(_gridData,4));
|
||
_borderDownRight.SetActive(!_mapData.CheckIfNearByGridSamePlayer(_gridData,2));
|
||
_borderUpRight.SetActive(!_mapData.CheckIfNearByGridSamePlayer(_gridData,6));
|
||
_borderUpLeft.SetActive(!_mapData.CheckIfNearByGridSamePlayer(_gridData,8));
|
||
}
|
||
|
||
public void UpdateFog()
|
||
{
|
||
bool isFog = !_mapData.PlayerMap.SelfPlayerData.Sight.CheckIsInSight(_gridData.Id);
|
||
if (_fog.activeSelf != isFog)
|
||
{
|
||
_fog.SetActive(isFog);
|
||
PlayFogEffect();
|
||
}
|
||
|
||
_land.SetActive(!isFog);
|
||
_road.SetActive(!isFog);
|
||
_mountain.SetActive(!isFog);
|
||
_forest.SetActive(!isFog);
|
||
_cityWall.SetActive(!isFog&&_cityWallMark);
|
||
_cityBuilding.SetActive(!isFog);
|
||
_resource.SetActive(!isFog);
|
||
if (isFog)
|
||
{
|
||
_borderDownLeft.SetActive(false);
|
||
_borderDownRight.SetActive(false);
|
||
_borderUpLeft.SetActive(false);
|
||
_borderUpRight.SetActive(false);
|
||
}
|
||
else
|
||
UpdateBorder();
|
||
}
|
||
|
||
|
||
public void SetBounceAnim()
|
||
{
|
||
if (needBounce) return;
|
||
needBounce = true;
|
||
isBounceDown = true;
|
||
bounceTime = 0f;
|
||
bounceUpPos = _ROGrid.transform.position;
|
||
bounceDownPos = new Vector3(_ROGrid.transform.position.x, _ROGrid.transform.position.y - 0.8f, _ROGrid.transform.position.z);
|
||
}
|
||
|
||
public void SetFogAnim()
|
||
{
|
||
if (_isPlayingFog) return;
|
||
_playFogEffect = true;
|
||
}
|
||
|
||
public void PlayFogEffect()
|
||
{
|
||
//给preview模块打的补丁
|
||
if (_ROGrid.transform.parent.name == "Grid") return;
|
||
|
||
var fogObj = _ROGrid.transform.Find("Effect").transform.Find("Fog").gameObject;
|
||
fogObj.SetActive(true);
|
||
var animancer = _ROGrid.transform.Find("Effect/Fog").GetComponent<AnimancerComponent>();
|
||
if (FogEffectAnim != null)
|
||
{
|
||
_isPlayingFog = true;
|
||
animancer.Play(FogEffectAnim);
|
||
Timer.Instance.TimerRegister(fogObj, () =>
|
||
{
|
||
fogObj.SetActive(false);
|
||
_isPlayingFog = false;
|
||
}, FogEffectAnim.length);
|
||
|
||
}
|
||
|
||
}
|
||
public void SetCityWall()
|
||
{
|
||
GameObject cityWall = new GameObject("CityWall");
|
||
SpriteRenderer sr = cityWall.AddComponent<SpriteRenderer>();
|
||
sr.sprite = Resources.Load<Sprite>($"ArtResources/TH1Buildings/TH1BuildingsCommon/TH1Building_CityWall");
|
||
cityWall.transform.parent = _ROGrid.transform;
|
||
//tpos = new Vector3(tpos.x + 1.22f * (x - y), tpos.y + 0.7f * (x + y) + z * 1.6f - 8.32f + 0.7f * (4 - houseEdge), tpos.z + 0.9f - (30 + z - x - y) * 0.001f);
|
||
cityWall.transform.localPosition = new Vector3(0, 0, 0);
|
||
}
|
||
|
||
}
|
||
} |