Commit a0dcf274 authored by Jordan B Mckenney's avatar Jordan B Mckenney

temp branch because I have no computer

parent 5e9ef7d7
fileFormatVersion: 2
guid: 3204d6a83813aa040b2ea1895f486060
folderAsset: yes
timeCreated: 1479432947
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5841dd40cb838a648bbe46a681bc8748
timeCreated: 1479432922
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0ba698c06397ec44e8ab14d4f7c8487a
timeCreated: 1479439371
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 403389796c389b14ca61ce9802b971a7
timeCreated: 1477012475
timeCreated: 1479440675
licenseType: Free
NativeFormatImporter:
userData:
......
......@@ -9,6 +9,8 @@ public class Actions : MonoBehaviour {
private int abilitiesCounter = 0; // A counter which lets you cycle through the abilities
private Image abilitiesImage; // Picture which shows which ability it active
public int health;
private Color abilityUnusable;
private Color abilityUsable;
......@@ -130,4 +132,8 @@ public class Actions : MonoBehaviour {
return LastInput;
}
void GetHit(int d){
health -= d;
}
}
......@@ -5,6 +5,7 @@ public class FireballProjectile : MonoBehaviour {
[HideInInspector]
public float speed;
public int damage = 1;
private Rigidbody2D rb;
public Vector2 move;
......@@ -18,6 +19,11 @@ public class FireballProjectile : MonoBehaviour {
void OnCollisionEnter2D(Collision2D c){
if(c.transform.CompareTag("Enemy")){
Debug.Log ("hit");
c.transform.SendMessage ("GetHit", damage);
}
Destroy (this.gameObject);
}
}
using UnityEngine;
using System.Collections;
public class TurtleActions : MonoBehaviour {
public int health = 3;
public Vector2 p;
public GameObject projectile = null;
public int speed = 5;
public float dist = 0;
private bool canShoot = true;
private float timer = 0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
dist = DistanceToPlayer ().magnitude;
p = DirectionToPlayer ();
if (health <= 0) {
Destroy (gameObject);
}
if (DistanceToPlayer ().magnitude < 5 && canShoot == true) {
GameObject clone = Instantiate (projectile, this.transform.position, Quaternion.identity) as GameObject;
clone.GetComponent<TurtleProjectile> ().move = DirectionToPlayer ();
clone.GetComponent<TurtleProjectile> ().speed = speed;
canShoot = false;
}
if (canShoot == false) {
timer += Time.deltaTime;
if (timer >= 2) {
canShoot = true;
timer = 0;
}
}
}
void GetHit(int d){
health -= d;
}
Vector2 DistanceToPlayer(){
Vector2 distance = new Vector2 (0,0);
Vector2 place = this.transform.position;
GameObject p = GameObject.FindGameObjectWithTag ("Player");
distance = (Vector2)p.transform.position - place;
return distance;
}
Vector2 DirectionToPlayerRaw(){
Vector2 dir = new Vector2 (0,0);
Vector2 distance = DistanceToPlayer ();
dir = distance / distance.magnitude;
return dir;
}
Vector2 DirectionToPlayer(){
Vector2 dirRaw = DirectionToPlayerRaw ();
Vector2 dir = new Vector2 (0,0);
if (dirRaw.x > 0.5)
dir = new Vector2 (1, 0);
else if (dirRaw.x < -0.5)
dir = new Vector2 (-1, 0);
else if (dirRaw.y > 0.5)
dir = new Vector2 (0, 1);
else if (dirRaw.y < -0.5)
dir = new Vector2 (0, -1);
return dir;
}
}
fileFormatVersion: 2
guid: b245668d1f70fae43ba9905676a8f688
timeCreated: 1477616043
guid: 8d306da6837ee0a45b03aa56490d777f
timeCreated: 1479432992
licenseType: Free
MonoImporter:
serializedVersion: 2
......
using UnityEngine;
using System.Collections;
public class FireballMove : MonoBehaviour {
public class TurtleProjectile : MonoBehaviour {
[HideInInspector]
public float speed;
private Rigidbody2D fireRB;
public int damage = 1;
private Rigidbody2D rb;
public Vector2 move;
// Use this for initialization
void Start () {
fireRB = GetComponent<Rigidbody2D> ();
fireRB.velocity = (move * speed);
void Start () {
rb = GetComponent<Rigidbody2D>();
rb.velocity = (move * speed);
}
void OnCollisionEnter2D(Collision2D c){
if(c.transform.CompareTag("Player")){
Debug.Log ("hit");
c.transform.SendMessage ("GetHit", damage);
}
Destroy (gameObject);
Destroy (this.gameObject);
}
}
fileFormatVersion: 2
guid: b0b90ae8d792ddd48b4de64e5a1cb384
timeCreated: 1479439648
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -4,6 +4,7 @@ using System.Collections;
public class WaterShieldProjectile : MonoBehaviour {
[HideInInspector]
public int damage = 1;
public float speed;
private Rigidbody2D rb;
[HideInInspector]
......@@ -18,6 +19,11 @@ public class WaterShieldProjectile : MonoBehaviour {
void OnCollisionEnter2D(Collision2D c){
if(c.transform.CompareTag("Enemy")){
Debug.Log ("hit");
c.transform.SendMessage ("GetHit", damage);
}
Destroy (this.gameObject);
}
}
fileFormatVersion: 2
guid: 07b9b2aa91222fc4199b11b3988b2b2f
timeCreated: 1479435638
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: Defeat_0
21300002: Defeat_1
21300004: Defeat_2
21300006: Defeat_3
21300008: Defeat_4
21300010: Defeat_5
21300012: Defeat_6
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 0
aniso: 16
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 16
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites:
- name: Defeat_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: Defeat_1
rect:
serializedVersion: 2
x: 16
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: Defeat_2
rect:
serializedVersion: 2
x: 32
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: Defeat_3
rect:
serializedVersion: 2
x: 48
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: Defeat_4
rect:
serializedVersion: 2
x: 64
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: Defeat_5
rect:
serializedVersion: 2
x: 80
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: Defeat_6
rect:
serializedVersion: 2
x: 96
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 583f5870ac1c1394e8ebd57b35a53b4a
timeCreated: 1479435564
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: DownA_0
21300002: DownA_1
21300004: DownA_2
21300006: DownA_3
21300008: DownA_4
21300010: DownA_5
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 0
aniso: 16
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 16
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites:
- name: DownA_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: DownA_1
rect:
serializedVersion: 2
x: 16
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: DownA_2
rect:
serializedVersion: 2
x: 32
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: DownA_3
rect:
serializedVersion: 2
x: 48
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: DownA_4
rect:
serializedVersion: 2
x: 64
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: DownA_5
rect:
serializedVersion: 2
x: 80
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 287ddaaa5312037429685fc64b1c4186
timeCreated: 1479435549
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: RightA_0
21300002: RightA_1
21300004: RightA_2
21300006: RightA_3
21300008: RightA_4
21300010: RightA_5
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 0
aniso: 16
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 16
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites:
- name: RightA_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: RightA_1
rect:
serializedVersion: 2
x: 16
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: RightA_2
rect:
serializedVersion: 2
x: 32
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: RightA_3
rect:
serializedVersion: 2
x: 48
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: RightA_4
rect:
serializedVersion: 2
x: 64
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: RightA_5
rect:
serializedVersion: 2
x: 80
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5f6b5d6ae8a49a94d85f61b4b4aa727f
timeCreated: 1479434442
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: UpA_0
21300002: UpA_1
21300004: UpA_2
21300006: UpA_3
21300008: UpA_4
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 0
aniso: 16
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 16
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites:
- name: UpA_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: UpA_1
rect:
serializedVersion: 2
x: 16
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: UpA_2
rect:
serializedVersion: 2
x: 32
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: UpA_3
rect:
serializedVersion: 2
x: 48
y: 0
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
- name: UpA_4
rect:
serializedVersion: 2
x: 64
y: 0