Added a deathbox and saws that trigger scene reload.
This commit is contained in:
parent
964a83343f
commit
ccb07b34ed
5 changed files with 32296 additions and 672 deletions
File diff suppressed because it is too large
Load diff
99
Game 1/Assets/Prefabs/Saw.prefab
Normal file
99
Game 1/Assets/Prefabs/Saw.prefab
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1001 &100100000
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications: []
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 0}
|
||||||
|
m_RootGameObject: {fileID: 1052280587920524}
|
||||||
|
m_IsPrefabParent: 1
|
||||||
|
--- !u!1 &1052280587920524
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4118735178573924}
|
||||||
|
- component: {fileID: 212779659227184502}
|
||||||
|
- component: {fileID: 58295540487747480}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Saw
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4118735178573924
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 1052280587920524}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -24.392323, y: -21.679274, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!58 &58295540487747480
|
||||||
|
CircleCollider2D:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 1052280587920524}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Radius: 0.7050781
|
||||||
|
--- !u!212 &212779659227184502
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 1052280587920524}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 4548b5a94a73ffc4a9d8a96b4c46bee4, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 1.3945312, y: 1.4101562}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
9
Game 1/Assets/Prefabs/Saw.prefab.meta
Normal file
9
Game 1/Assets/Prefabs/Saw.prefab.meta
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bf4119e4aa28f2d4aa04722cb5c2deb2
|
||||||
|
timeCreated: 1504644467
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
mainObjectFileID: 100100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
// Simple script for a test I need to do
|
// Simple script for a test I need to do
|
||||||
|
|
||||||
|
@ -25,9 +26,17 @@ public class PlayerController : MonoBehaviour {
|
||||||
|
|
||||||
if (Input.GetMouseButtonDown(0))
|
if (Input.GetMouseButtonDown(0))
|
||||||
{
|
{
|
||||||
explode.Play();
|
//explode.Play();
|
||||||
Debug.Log("Explosion at: " + Input.mousePosition);
|
Debug.Log("Explosion at: " + Input.mousePosition);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Handle collisions with Deathbox to trigger level restart.
|
||||||
|
void OnTriggerEnter2D(Collider2D other) {
|
||||||
|
|
||||||
|
// Deathbox and saws restart level
|
||||||
|
if (other.gameObject.name == "Deathbox" || other.gameObject.name == "Saw") {
|
||||||
|
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
m_EditorVersion: 2017.1.1f1
|
m_EditorVersion: 5.6.2f1
|
||||||
|
|
Reference in a new issue