boing
This commit is contained in:
parent
7070b33ad3
commit
96acb9ba5f
@ -96,9 +96,11 @@ GameObject:
|
||||
- component: {fileID: 1307381679213458928}
|
||||
- component: {fileID: 3190295003044267436}
|
||||
- component: {fileID: 3996260041246843173}
|
||||
- component: {fileID: 2327441879067933148}
|
||||
- component: {fileID: 3359596523382966936}
|
||||
m_Layer: 0
|
||||
m_Name: bounce
|
||||
m_TagString: Untagged
|
||||
m_TagString: bouncy
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
@ -186,7 +188,7 @@ Rigidbody2D:
|
||||
m_LinearDrag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_GravityScale: 1
|
||||
m_Material: {fileID: 6200000, guid: 21a3f3d092f606549b98090aeb342352, type: 2}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
@ -197,3 +199,62 @@ Rigidbody2D:
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!61 &2327441879067933148
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2587898580844709860}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 1, y: 1}
|
||||
newSize: {x: 1, y: 1}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &3359596523382966936
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2587898580844709860}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f11c011d93f67a140b0991fa94ea41c3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RB: {fileID: 3996260041246843173}
|
||||
bounceForce: 2
|
||||
|
@ -32030,10 +32030,6 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: water
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3996260041246843173, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
||||
propertyPath: m_Material
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8574288191223281125, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: -1
|
||||
@ -32081,81 +32077,13 @@ PrefabInstance:
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 2587898580844709860, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 6786427508792748235}
|
||||
- targetCorrespondingSourceObject: {fileID: 2587898580844709860, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 6786427508792748236}
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
||||
--- !u!4 &6786427508792748233 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 8574288191223281125, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
||||
m_PrefabInstance: {fileID: 6786427508792748232}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &6786427508792748234 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 2587898580844709860, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
||||
m_PrefabInstance: {fileID: 6786427508792748232}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!61 &6786427508792748235
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6786427508792748234}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 6200000, guid: 21a3f3d092f606549b98090aeb342352, type: 2}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 1, y: 1}
|
||||
newSize: {x: 1, y: 1}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &6786427508792748236
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6786427508792748234}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f11c011d93f67a140b0991fa94ea41c3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &8529024255618899271
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2,6 +2,8 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// MIGHT NOT NEED THIS LOL
|
||||
|
||||
public class WaterBehavior : MonoBehaviour
|
||||
{
|
||||
public Rigidbody2D RB;
|
||||
@ -15,7 +17,7 @@ public class WaterBehavior : MonoBehaviour
|
||||
|
||||
private void Bounce()
|
||||
{
|
||||
RB.velocity = new Vector2(RB.velocity.x, -(RB.velocity.y));
|
||||
RB.AddForce(RB.velocity * bounceForce, ForceMode2D.Impulse);
|
||||
/*RB.velocity = new Vector2(RB.velocity.x, -(RB.velocity.y));
|
||||
RB.AddForce(RB.velocity * bounceForce, ForceMode2D.Impulse);*/
|
||||
}
|
||||
}
|
||||
|
@ -222,6 +222,11 @@ public class PlayerBehavior : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
void Bounce()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OnTriggerEnter2D(Collider2D col)
|
||||
{
|
||||
if (col.tag == "grappleSurface")
|
||||
@ -243,6 +248,10 @@ public class PlayerBehavior : MonoBehaviour
|
||||
this.playerController.in_range = true;
|
||||
this.playerController.enemy = col.transform.parent.gameObject;
|
||||
}
|
||||
else if (col.tag == "bouncy")
|
||||
{
|
||||
Bounce();
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerExit2D(Collider2D col)
|
||||
|
@ -21,6 +21,7 @@ TagManager:
|
||||
- DEBUG
|
||||
- ProjectileEnemy
|
||||
- GameUICanvas
|
||||
- bouncy
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
Loading…
Reference in New Issue
Block a user