add smashable brick

master
Jordan Orelli 4 years ago
parent 485dfd2dff
commit bfd71459be

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Smashable
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.4009434, g: 0.73595405, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eb137da43f13e0348992cb3fbaaf5266
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,121 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1055479319149153773
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 366430521736948989}
- component: {fileID: 1909192419560415652}
- component: {fileID: 5543613247571184004}
- component: {fileID: 801139638099033551}
- component: {fileID: 1004358370431274951}
m_Layer: 10
m_Name: Smashdoor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &366430521736948989
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1055479319149153773}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.5, z: 0}
m_LocalScale: {x: 1, y: 3, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1909192419560415652
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1055479319149153773}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5543613247571184004
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1055479319149153773}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: eb137da43f13e0348992cb3fbaaf5266, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!114 &801139638099033551
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1055479319149153773}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2372a8161d64183488c25c108a3a19fd, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!61 &1004358370431274951
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1055479319149153773}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
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, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a03e446552051a541a30f02131d25238
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -8732,7 +8732,7 @@ PrefabInstance:
- target: {fileID: 4623847142764859880, guid: b29a944aaba25f643afdc6b049845662, - target: {fileID: 4623847142764859880, guid: b29a944aaba25f643afdc6b049845662,
type: 3} type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4623847142764859880, guid: b29a944aaba25f643afdc6b049845662, - target: {fileID: 4623847142764859880, guid: b29a944aaba25f643afdc6b049845662,
type: 3} type: 3}
@ -8846,6 +8846,75 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b29a944aaba25f643afdc6b049845662, type: 3} m_SourcePrefab: {fileID: 100100000, guid: b29a944aaba25f643afdc6b049845662, type: 3}
--- !u!1001 &4943807520198253448
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalPosition.x
value: 40
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.5
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_RootOrder
value: 19
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 366430521736948989, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1055479319149153773, guid: a03e446552051a541a30f02131d25238,
type: 3}
propertyPath: m_Name
value: Smashdoor
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a03e446552051a541a30f02131d25238, type: 3}
--- !u!1001 &5870811650667753103 --- !u!1001 &5870811650667753103
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

@ -1,6 +1,4 @@
using System.Collections; using UnityEngine;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
public class MoveControllerDebugDisplay : MonoBehaviour { public class MoveControllerDebugDisplay : MonoBehaviour {
@ -30,6 +28,7 @@ public class MoveControllerDebugDisplay : MonoBehaviour {
showBool(leftDisplay, moveController.collisions.left); showBool(leftDisplay, moveController.collisions.left);
showBool(rightDisplay, moveController.collisions.right); showBool(rightDisplay, moveController.collisions.right);
} }
if (player) { if (player) {
switch (player.jumpState) { switch (player.jumpState) {
case PlayerController.JumpState.Grounded: case PlayerController.JumpState.Grounded:
@ -54,7 +53,6 @@ public class MoveControllerDebugDisplay : MonoBehaviour {
jumpStateDisplay.text = "???"; jumpStateDisplay.text = "???";
break; break;
} }
} }
} }

@ -366,6 +366,13 @@ public class PlayerController : MonoBehaviour {
// Destroy(gameObject); // Destroy(gameObject);
} }
} }
Smashable smashable = other.GetComponent<Smashable>();
if (smashable) {
if (jumpState == JumpState.Dash) {
Destroy(smashable.gameObject);
}
}
} }
public void OnEnable() { public void OnEnable() {

@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Smashable : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2372a8161d64183488c25c108a3a19fd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save