Skip to content

Commit 858008e

Browse files
committed
Conflicts: Assets/Scenes/CloudSandbox.unity
2 parents 4f0ecdb + d4c5e99 commit 858008e

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

Assets/Prefabs/CloudPrefab.prefab

0 Bytes
Binary file not shown.

Assets/Scenes/CloudSandbox.unity

96 Bytes
Binary file not shown.

Assets/Scripts/CloudController.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ void Update()
7373

7474
rigidbody.AddForce(deltaPosition * pullVelocity * deltaMag);
7575
}
76-
else if (state == CloudState.Dead)
77-
{
78-
rigidbody.velocity = Vector3.zero;
79-
particleSystem.enableEmission = false;
80-
gameObject.SetActive(false);
81-
}
8276
}
8377

8478
public void SetNormalState()
@@ -91,17 +85,17 @@ public void SetNormalState()
9185

9286
public void SetDeadState()
9387
{
94-
rigidbody.velocity = Vector3.zero;
88+
state = CloudState.Dead;
9589
particleSystem.enableEmission = false;
96-
state = CloudState.Dead;
97-
gameObject.SetActive(false);
90+
rigidbody.velocity = Vector3.zero;
91+
gameObject.SetActive(false);
9892
}
9993

10094
void OnCollisionEnter(Collision collision)
10195
{
10296
if (collision.gameObject.name.Equals("Walls"))
10397
{
104-
print("WALL HIT");
98+
print(collision.gameObject.name);
10599
flip *= -1;
106100
}
107101
}
@@ -127,9 +121,8 @@ void OnTriggerExit(Collider collision)
127121
{
128122
if (state == CloudState.Rain)
129123
{
130-
state = CloudState.Dead;
131-
particleSystem.enableEmission = false;
132124
rainingClouds.Remove(this);
125+
SetDeadState();
133126
}
134127
}
135128
}

ProjectSettings/QualitySettings.asset

100644100755
File mode changed.

0 commit comments

Comments
 (0)