Skip to content

Commit

Permalink
disabled the ball colliders in the prefabs
Browse files Browse the repository at this point in the history
  • Loading branch information
ianbbqzy committed Nov 20, 2017
1 parent f163446 commit 9992247
Show file tree
Hide file tree
Showing 13 changed files with 170 additions and 160 deletions.
282 changes: 137 additions & 145 deletions Assets/Prefabs/UI/Sidebar.prefab

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions Assets/Prefabs/balls/Blue.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1743798012550768}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 0
Expand All @@ -85,7 +85,7 @@ BoxCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1743798012550768}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 1
Expand Down Expand Up @@ -127,6 +127,7 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -142,6 +143,7 @@ SpriteRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down
6 changes: 4 additions & 2 deletions Assets/Prefabs/balls/DemoWhite.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1079940132241738}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 0
Expand All @@ -85,7 +85,7 @@ BoxCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1079940132241738}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 1
Expand Down Expand Up @@ -125,6 +125,7 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -140,6 +141,7 @@ SpriteRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down
6 changes: 4 additions & 2 deletions Assets/Prefabs/balls/Green.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1958122540754108}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 0
Expand All @@ -85,7 +85,7 @@ BoxCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1958122540754108}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 1
Expand Down Expand Up @@ -127,6 +127,7 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -142,6 +143,7 @@ SpriteRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down
6 changes: 4 additions & 2 deletions Assets/Prefabs/balls/Orange.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1644927921308316}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 0
Expand All @@ -85,7 +85,7 @@ BoxCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1644927921308316}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 1
Expand Down Expand Up @@ -127,6 +127,7 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -142,6 +143,7 @@ SpriteRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down
6 changes: 4 additions & 2 deletions Assets/Prefabs/balls/Pink.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1681027475477804}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 0
Expand All @@ -85,7 +85,7 @@ BoxCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1681027475477804}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 1
Expand Down Expand Up @@ -127,6 +127,7 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -142,6 +143,7 @@ SpriteRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down
6 changes: 4 additions & 2 deletions Assets/Prefabs/balls/Purple.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1368487416818418}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 0
Expand All @@ -85,7 +85,7 @@ BoxCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1368487416818418}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 1
Expand Down Expand Up @@ -127,6 +127,7 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -142,6 +143,7 @@ SpriteRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down
6 changes: 4 additions & 2 deletions Assets/Prefabs/balls/White.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CircleCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1202815009129246}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 0
Expand All @@ -85,7 +85,7 @@ BoxCollider2D:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1202815009129246}
m_Enabled: 1
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 6200000, guid: 6c0e483e449473842846ec8c4b441b8c, type: 2}
m_IsTrigger: 1
Expand Down Expand Up @@ -127,6 +127,7 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -142,6 +143,7 @@ SpriteRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Ball.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Ball : MonoBehaviour {
void Start () {
keeperScript = GameObject.Find("ScoreKeeper").GetComponent<ScoreKeeper>();
rb = gameObject.GetComponent<Rigidbody2D> ();
// gameObject.GetComponent<CircleCollider2D> ().enabled = false;
// gameObject.GetComponent<BoxCollider2D> ().enabled = false;
}

public void init(Vector2 direction) {
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/ChangeColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ void OnTriggerEnter2D(Collider2D collider) {

newBall.GetComponent<Rigidbody2D> ().gravityScale = 1;
newBall.GetComponent<CircleCollider2D> ().enabled = true;
newBall.GetComponent<BoxCollider2D> ().enabled = true;

newBall.transform.position = newPosition;
newBall.transform.GetComponent<Rigidbody2D>().velocity = velocity;
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Source.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void ReleaseBall() {
GameObject ball = stack.Pop();
ball.GetComponent<Rigidbody2D> ().gravityScale = 1;
ball.GetComponent<CircleCollider2D> ().enabled = true;
ball.GetComponent<BoxCollider2D> ().enabled = true;
ball.GetComponent<Ball> ().painted = false;
}
}
Expand Down
1 change: 1 addition & 0 deletions ProjectSettings/DynamicsManager.asset
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ PhysicsManager:
m_EnablePCM: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
m_AutoSyncTransforms: 1
1 change: 1 addition & 0 deletions ProjectSettings/Physics2DSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Physics2DSettings:
m_QueriesStartInColliders: 1
m_ChangeStopsCallbacks: 0
m_CallbacksOnDisable: 1
m_AutoSyncTransforms: 1
m_AlwaysShowColliders: 0
m_ShowColliderSleep: 1
m_ShowColliderContacts: 0
Expand Down

0 comments on commit 9992247

Please sign in to comment.