background tweak
This commit is contained in:
parent
dd615f8412
commit
9da73c8711
|
|
@ -95,7 +95,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 48008404774389057}
|
m_GameObject: {fileID: 48008404774389057}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -14.809999, y: 16.19, z: 4}
|
m_LocalPosition: {x: -14.809999, y: 16.19, z: 7}
|
||||||
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
|
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -179,7 +179,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 142668770637573274}
|
m_GameObject: {fileID: 142668770637573274}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -10.999999, y: 14.43, z: 3}
|
m_LocalPosition: {x: -10.999999, y: 14.43, z: 5}
|
||||||
m_LocalScale: {x: 1.3, y: 1.3, z: 1}
|
m_LocalScale: {x: 1.3, y: 1.3, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -5526,7 +5526,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1689777899027513442}
|
m_GameObject: {fileID: 1689777899027513442}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -14.949999, y: 19, z: 5}
|
m_LocalPosition: {x: -14.949999, y: 20.79, z: 10}
|
||||||
m_LocalScale: {x: 1.5, y: 1.3, z: 1}
|
m_LocalScale: {x: 1.5, y: 1.3, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -6018,7 +6018,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2819324293506729970}
|
m_GameObject: {fileID: 2819324293506729970}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 15}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
|
|
@ -16255,7 +16255,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4486063997620376271}
|
m_GameObject: {fileID: 4486063997620376271}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -9.539999, y: 7.14, z: 0.5}
|
m_LocalPosition: {x: -9.539999, y: 7.14, z: 2}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -17004,7 +17004,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 5311994334533416849}
|
m_GameObject: {fileID: 5311994334533416849}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -1.5499992, y: 14.43, z: 3}
|
m_LocalPosition: {x: -1.5499992, y: 14.43, z: 5}
|
||||||
m_LocalScale: {x: 1.3, y: 1.3, z: 1}
|
m_LocalScale: {x: 1.3, y: 1.3, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -17340,7 +17340,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6066020027537218953}
|
m_GameObject: {fileID: 6066020027537218953}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -14.949999, y: 10.63, z: 1}
|
m_LocalPosition: {x: -14.949999, y: 10.63, z: 3}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -17455,7 +17455,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6180148023822034482}
|
m_GameObject: {fileID: 6180148023822034482}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -9.189999, y: 16.19, z: 4}
|
m_LocalPosition: {x: -9.189999, y: 16.19, z: 7}
|
||||||
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
|
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -17707,7 +17707,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6669530977136506239}
|
m_GameObject: {fileID: 6669530977136506239}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -14.23, y: 7.14, z: 0.5}
|
m_LocalPosition: {x: -14.23, y: 7.14, z: 2}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -18598,7 +18598,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 8378942238073706322}
|
m_GameObject: {fileID: 8378942238073706322}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -7.8899994, y: 19, z: 5}
|
m_LocalPosition: {x: -7.8899994, y: 20.79, z: 10}
|
||||||
m_LocalScale: {x: 1.5, y: 1.3, z: 1}
|
m_LocalScale: {x: 1.5, y: 1.3, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -18796,14 +18796,19 @@ MonoBehaviour:
|
||||||
_backgroundObjects:
|
_backgroundObjects:
|
||||||
- first: {fileID: 7088125737275763684}
|
- first: {fileID: 7088125737275763684}
|
||||||
second: {fileID: 3578614616298500996}
|
second: {fileID: 3578614616298500996}
|
||||||
|
isCloud: 1
|
||||||
- first: {fileID: 4120052851030622860}
|
- first: {fileID: 4120052851030622860}
|
||||||
second: {fileID: 2375492676405863283}
|
second: {fileID: 2375492676405863283}
|
||||||
|
isCloud: 1
|
||||||
- first: {fileID: 5685927704915689371}
|
- first: {fileID: 5685927704915689371}
|
||||||
second: {fileID: 7836447183238034407}
|
second: {fileID: 7836447183238034407}
|
||||||
|
isCloud: 0
|
||||||
- first: {fileID: 3212616479633791068}
|
- first: {fileID: 3212616479633791068}
|
||||||
second: {fileID: 7250382413331960117}
|
second: {fileID: 7250382413331960117}
|
||||||
|
isCloud: 1
|
||||||
- first: {fileID: 2570246928390889843}
|
- first: {fileID: 2570246928390889843}
|
||||||
second: {fileID: 6418936641992724766}
|
second: {fileID: 6418936641992724766}
|
||||||
|
isCloud: 1
|
||||||
--- !u!1 &8860318310391524628
|
--- !u!1 &8860318310391524628
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -18948,7 +18953,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 9051088810553960426}
|
m_GameObject: {fileID: 9051088810553960426}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -10.239999, y: 10.63, z: 1}
|
m_LocalPosition: {x: -10.239999, y: 10.63, z: 3}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb
|
||||||
private const int PILLAR_AMOUNT_X = 12;
|
private const int PILLAR_AMOUNT_X = 12;
|
||||||
private const int PILLAR_AMOUNT_Y = 3;
|
private const int PILLAR_AMOUNT_Y = 3;
|
||||||
private const int BACKGROUND_OBJECT_AMOUNT = 10;
|
private const int BACKGROUND_OBJECT_AMOUNT = 10;
|
||||||
|
private const float CLOUD_MOVE_SPEED = 0.75f;
|
||||||
|
|
||||||
[Header("Components")]
|
[Header("Components")]
|
||||||
[SerializeField] private Transform _pillarFirst;
|
[SerializeField] private Transform _pillarFirst;
|
||||||
|
|
@ -175,6 +176,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb
|
||||||
{
|
{
|
||||||
public Transform first;
|
public Transform first;
|
||||||
public Transform second;
|
public Transform second;
|
||||||
|
public bool isCloud;
|
||||||
|
|
||||||
private List<Transform> _objects = new();
|
private List<Transform> _objects = new();
|
||||||
|
|
||||||
|
|
@ -182,6 +184,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb
|
||||||
|
|
||||||
private float _startX;
|
private float _startX;
|
||||||
private float _xDistance;
|
private float _xDistance;
|
||||||
|
private float _moveX;
|
||||||
|
|
||||||
private float GetDistance()
|
private float GetDistance()
|
||||||
{
|
{
|
||||||
|
|
@ -205,7 +208,15 @@ namespace HeavenStudio.Games.Scripts_TotemClimb
|
||||||
|
|
||||||
public void ScrollClones(float currentScrollX)
|
public void ScrollClones(float currentScrollX)
|
||||||
{
|
{
|
||||||
float currentDistanceX = _startX + (_xDistance * _index) + (_xDistance * (BACKGROUND_OBJECT_AMOUNT + 2) / 2);
|
if (isCloud)
|
||||||
|
{
|
||||||
|
foreach (var b in _objects)
|
||||||
|
{
|
||||||
|
b.localPosition += new Vector3(-Time.deltaTime * CLOUD_MOVE_SPEED, 0);
|
||||||
|
}
|
||||||
|
_moveX -= Time.deltaTime * CLOUD_MOVE_SPEED;
|
||||||
|
}
|
||||||
|
float currentDistanceX = _startX + (_xDistance * _index) + (_xDistance * (BACKGROUND_OBJECT_AMOUNT + 2) / 2) + _moveX;
|
||||||
|
|
||||||
if (currentScrollX >= currentDistanceX)
|
if (currentScrollX >= currentDistanceX)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue