Skip to content
Snippets Groups Projects
Commit 0bc8c196 authored by rinda's avatar rinda
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #9438 failed
Showing
with 137 additions and 0 deletions
fileFormatVersion: 2
guid: a8421d374f00145d485dad8f07fdde7e
folderAsset: yes
timeCreated: 1438075911
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: 2857e183f4cd3df4e9096e5b578bd32f
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: 384371afbb4354cc9a3fc68eab303756
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: a93496017806b7740910df5fd946f306
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e808c5b1c88ff4a3c8aa624eaa9de561
folderAsset: yes
timeCreated: 1438075911
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: 9930946b7c5f48e44aef1e56c2de7315
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: 83c2ed844a8c74b779a4c823d16594b1
timeCreated: 1484217493
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: fd392ff95d385bc41b7ba22b8726b447
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: 2b3304b1f0cb55740b5d36dca9604d05
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 58807f508f6e4964c90a1b72359715cb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestroyByBoundary : MonoBehaviour
{
void OnTriggerExit(Collider other){
Destroy(other.gameObject);
}
}
fileFormatVersion: 2
guid: 63f0115d1d1babe4fb99ea390902e02a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestroyByContact : MonoBehaviour
{
public GameObject explosion;
public GameObject playerExplosion;
public int scoreValue;
private GameController gameController;
void Start(){
GameObject gameControllerObject = GameObject.FindWithTag("GameController");
if (gameControllerObject!=null) {
gameController = gameControllerObject.GetComponent<GameController>();
}
}
void OnTriggerEnter(Collider other){
if (other.tag=="Boundary"){
return;
}
Instantiate(explosion,transform.position,transform.rotation);
if (other.tag=="Player"){
Instantiate(playerExplosion,other.transform.position,other.transform.rotation);
gameController.GameOver();
}
Destroy(other.gameObject);
Destroy(gameObject);
gameController.AddScore(scoreValue);
}
}
fileFormatVersion: 2
guid: c0886099d0bc20347b77a2bfec56cf1c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment