Commit 2f4de00c authored by kgingras's avatar kgingras
Browse files

gravity land mine weapon upgrade

parent 74220f77
using UnityEngine;
using System.Collections;
public class BHprojectile : MonoBehaviour {
public GameObject holeInWallPrefab;
int i = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnCollisionEnter(Collision coll){
foreach (ContactPoint contact in coll.contacts) {
GameObject holeInWall = (GameObject)Instantiate(holeInWallPrefab, contact.point, Quaternion.FromToRotation(-Vector3.forward,contact.normal));
Destroy(gameObject);
}
}
}
fileFormatVersion: 2
guid: c00a71b18392a4f4d92b1a6a2d6a175b
timeCreated: 1455745702
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
public class FluctuateSize : MonoBehaviour {
public float scale;
public float target;
public float max = 0.8f;
public float min = 0.3f;
public float speed = 2f;
// Use this for initialization
void Start () {
scale = min;
target = max;
}
// Update is called once per frame
void Update () {
if( Mathf.Abs(scale - target) < .1f){
if (target == max){target = min;}
else{target = max;}
}
scale = Mathf.Lerp(scale, target, Time.deltaTime * speed);
transform.localScale = new Vector3(scale, scale, scale);
}
}
fileFormatVersion: 2
guid: f299432dc701da44ea8084193d2fba0c
timeCreated: 1455675517
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1d68b3138efe0e640ae7ff4455326c46
timeCreated: 1455674476
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3c64f1b1dcdc4fc4cadc2dc416f58da6
timeCreated: 1455675357
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1c1552811597f7e49b499f77d9cc6b48
timeCreated: 1455676759
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 16be164051cdd1245bb60fe4e536e631
timeCreated: 1455675077
licenseType: Free
SubstanceImporter:
serializedVersion: 5
materialInstances:
- serializedVersion: 16
name: Snow
prototypeName: Snow
shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
shaderKeywords:
renderQueue: -1
lightmapFlags: 5
inputs: []
materialInformation:
serializedVersion: 5
offset: {x: 0, y: 0}
scale: {x: 1, y: 1}
generateMipmaps: 1
generateAllOutputs: 0
animationUpdateRate: 0
materialProperties:
serializedVersion: 2
texEnvs: {}
floats: {}
colors: {}
textureParameters:
- name: Snow_basecolor
alphaSource: 6
filterMode: 1
aniso: 1
wrapMode: 0
- name: Snow_normal
alphaSource: 0
filterMode: 1
aniso: 1
wrapMode: 0
- name: Snow_metallic
alphaSource: 7
filterMode: 1
aniso: 1
wrapMode: 0
- name: Snow_emissive
alphaSource: 0
filterMode: 1
aniso: 1
wrapMode: 0
- name: Snow_height
alphaSource: 0
filterMode: 1
aniso: 1
wrapMode: 0
- name: Snow_ambientOcclusion
alphaSource: 0
filterMode: 1
aniso: 1
wrapMode: 0
textureAssignments:
- shaderProp:
name: _MainTex
material: {instanceID: 0}
baseUID: 1452726277
- shaderProp:
name: _BumpMap
material: {instanceID: 0}
baseUID: 1452726275
- shaderProp:
name: _ParallaxMap
material: {instanceID: 0}
baseUID: 1452725858
- shaderProp:
name: _OcclusionMap
material: {instanceID: 0}
baseUID: 1452725759
- shaderProp:
name: _EmissionMap
material: {instanceID: 0}
baseUID: 1452727796
- shaderProp:
name: _MetallicGlossMap
material: {instanceID: 0}
baseUID: 1452726303
buildTargetSettings:
- serializedVersion: 2
buildTarget:
textureWidth: 512
textureHeight: 512
textureFormat: 0
loadingBehavior: 1
deletedPrototypes: []
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 04610a8d1f9b3c04dbcbc35cf2377efe
timeCreated: 1455674967
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: e4401ab84799fdb4c81cef1383f96b46
timeCreated: 1455674955
licenseType: Free
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
public class PowerUP : MonoBehaviour {
public GameObject wallPrefab;
public GameObject blackholePrefab;
public GameObject explosionPrefab;
public int _powerup;
public GameObject _PUobject;
// Use this for initialization
void Start () {
SpawnPU();
}
// Update is called once per frame
void Update () {
}
void SpawnPU(){
_powerup = Random.Range(1, 4);
if(_powerup == 1){
if(transform.rotation.x < 0){
_PUobject = (GameObject)Instantiate(wallPrefab, gameObject.transform.position + new Vector3(0, 1.2f,0), Quaternion.identity);
}
else{
_PUobject = (GameObject)Instantiate(wallPrefab, gameObject.transform.position - new Vector3(0, 1.2f,0), Quaternion.identity);
}
}
else if(_powerup == 2){
if(transform.rotation.x < 0){
_PUobject = (GameObject)Instantiate(blackholePrefab, gameObject.transform.position + new Vector3(0, 0.78f,0), Quaternion.Euler(new Vector3(270,0,0)));
}
else{
_PUobject = (GameObject)Instantiate(blackholePrefab, gameObject.transform.position - new Vector3(0, 0.78f,0), Quaternion.Euler(new Vector3(90,0,0)));
}
}
else if(_powerup == 3){
if(transform.rotation.x < 0){
_PUobject = (GameObject)Instantiate(explosionPrefab, gameObject.transform.position + new Vector3(0, 1.2f,0), Quaternion.identity);
}
else{
_PUobject = (GameObject)Instantiate(explosionPrefab, gameObject.transform.position - new Vector3(0, 1.2f,0), Quaternion.identity);
}
}
}
}
fileFormatVersion: 2
guid: b35ee8c4ecc527148b9dd0143e4535b0
timeCreated: 1455677018
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0a598456af85ae34a8ff055fa527820b
timeCreated: 1455678766
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
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