Commit e638c4e3 authored by Hao Chen (hac185)'s avatar Hao Chen (hac185)
Browse files
parents d1a99a7f 61f1e514
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections;
public class levelThreeScript : MonoBehaviour {
void OnCollisionEnter2D(Collision2D cal){
if(cal.gameObject.CompareTag("Player")){
SceneManager.LoadScene ("level3");
}
}
}
fileFormatVersion: 2
guid: d97f5f3c657d5fe409572bf5082dfa09
timeCreated: 1480209111
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -3,9 +3,16 @@ using System.Collections;
public class resetPlayer : MonoBehaviour {
public GameObject check;
void Start() {
}
void OnTriggerEnter2D(Collider2D other){
if(other.CompareTag("Player")){
Application.LoadLevel(Application.loadedLevel);
other.gameObject.SendMessage("TakeEnvironmentDamage", -5);
other.gameObject.transform.position = ( new Vector3(check.transform.position.x, check.transform.position.y, check.transform.position.z));
}
}
}
fileFormatVersion: 2
guid: ad835b855ca1d0644873377cd7c26d0d
timeCreated: 1480208934
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment