facebook twitter hatena line email

Unity/おすすめアセット/ビル群

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

ビル群

https://ghoul-life.hatenablog.com/entry/2019/02/27/200305

範囲調整

BuildingMapCreater.cs

    private int MAP_SIZE_W = 500;
    private int MAP_SIZE_H = 100;

ビルをローカル座標に設置

Building.cs

- this.transform.position = _targetPosition;
+ this.transform.localPosition = _targetPosition;
- this.transform.position = new Vector3(_targetPosition.x, _targetPosition.y - mapObjectData.scale.y, _targetPosition.z);
+ this.transform.localPosition = new Vector3(_targetPosition.x, _targetPosition.y - mapObjectData.scale.y, _targetPosition.z);   

ビルが伸びるアニメーション削除

Stage.stage

- StartCoroutine(_CreateMap());
+ _CreateMap();

- private IEnumerator _CreateMap()
+ private void _CreateMap()

- yield return new WaitForEndOfFrame();

Building.csの以下削除

    void Update()
    {
        if (_isInitialize)
        {
            if (Vector3.Distance(this.transform.position, _targetPosition) > 0.01f)
            {
                this.transform.position = Vector3.MoveTowards(this.transform.position, _targetPosition, INIT_TIME * Time.deltaTime);
            }
            else
            {
                this.transform.position = _targetPosition;
                _isInitialize = false;
            }
        }
    }

ビルに霧追加

  1. Unityメインメニュー/Window/Rendering/Lighting/Environmentへ
  2. Fogをonへ
  3. Fog/Colorを薄青へ
  4. Fog/ModeをExponentialSquaredからExponentialへ