Commit 9eb1fc2b authored by Andrew Van Buren's avatar Andrew Van Buren

Added water boss aniations/trigger and added new water sprite.

parent d6f4bbbf
fileFormatVersion: 2
guid: 5ac09d79e8c125b4b9dda4ea8778ca0e
timeCreated: 1479599773
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
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: 1
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: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 45f25d9fbdf060b4bbcf057244c49a8b
timeCreated: 1479599773
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
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: 1
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: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 44e8e01ea1850d24abda7b36ab1388e4
timeCreated: 1479597124
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
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: 1
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: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b641e451acdc12541acef94eaf7d4c8e
timeCreated: 1478834377
guid: 9938d9ae265a24040b7ed476aac5667f
timeCreated: 1479597394
licenseType: Free
NativeFormatImporter:
userData:
......
fileFormatVersion: 2
guid: 76ddfd6c9b4c8b840840ca52fb594a49
timeCreated: 1479598471
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f21a18cba8cc7ad459945aba0354de48
timeCreated: 1479597394
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 35b5272e015639a45a493ef1f789a3fe
timeCreated: 1479597383
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: scorpion boss attack_0
21300002: scorpion boss attack_1
21300004: scorpion boss attack_2
21300006: scorpion boss attack_3
21300008: scorpion boss attack_4
21300010: scorpion boss attack_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: scorpion boss attack_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -7, y: 16}
- {x: -16, y: 14}
- {x: -16, y: -11}
- {x: -12, y: -16}
- {x: 14, y: -16}
- {x: 16, y: -10}
- {x: 16, y: 11}
- {x: 12, y: 16}
- name: scorpion boss attack_1
rect:
serializedVersion: 2
x: 32
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: 2, y: -16}
- {x: 13, y: -16}
- {x: 16, y: -11}
- {x: 16, y: 6}
- {x: 10, y: 14}
- {x: 8, y: 16}
- {x: -3, y: 16}
- {x: -16, y: 9}
- {x: -16, y: -10}
- {x: -12, y: -16}
- {x: -2, y: -16}
- {x: 0, y: -14}
- {x: 0, y: -13}
- {x: 0, y: -14}
- name: scorpion boss attack_2
rect:
serializedVersion: 2
x: 64
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -11, y: 16}
- {x: -16, y: 9}
- {x: -16, y: -8}
- {x: -7, y: -16}
- {x: 16, y: -16}
- {x: 16, y: 11}
- {x: 9, y: 16}
- name: scorpion boss attack_3
rect:
serializedVersion: 2
x: 96
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -5, y: 16}
- {x: -16, y: 12}
- {x: -16, y: -16}
- {x: 16, y: -16}
- {x: 16, y: 7}
- {x: 9, y: 16}
- name: scorpion boss attack_4
rect:
serializedVersion: 2
x: 128
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -3, y: 16}
- {x: -16, y: 11}
- {x: -16, y: -16}
- {x: 12, y: -16}
- {x: 16, y: -13}
- {x: 16, y: 9}
- {x: 13, y: 16}
- name: scorpion boss attack_5
rect:
serializedVersion: 2
x: 160
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: 1, y: -16}
- {x: 15, y: -16}
- {x: 16, y: -15}
- {x: 16, y: 10}
- {x: 13, y: 16}
- {x: -4, y: 16}
- {x: -16, y: 10}
- {x: -16, y: -11}
- {x: -13, y: -16}
- {x: -1, y: -16}
- {x: 0, y: -15}
- {x: 0, y: -14}
- {x: 0, y: -15}
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 47fe183d03a439047bba595e50a05a85
timeCreated: 1479598462
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: scorpion boss walk_0
21300002: scorpion boss walk_1
21300004: scorpion boss walk_2
21300006: scorpion boss walk_3
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: scorpion boss walk_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -11, y: 16}
- {x: -16, y: 10}
- {x: -16, y: -14}
- {x: -15, y: -16}
- {x: 14, y: -16}
- {x: 15, y: -15}
- {x: 15, y: 4}
- {x: 14, y: 16}
- name: scorpion boss walk_1
rect:
serializedVersion: 2
x: 32
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -9, y: 16}
- {x: -16, y: 12}
- {x: -16, y: -16}
- {x: 16, y: -16}
- {x: 16, y: 13}
- {x: 15, y: 16}
- name: scorpion boss walk_2
rect:
serializedVersion: 2
x: 64
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -6, y: 16}
- {x: -10, y: 15}
- {x: -16, y: 6}
- {x: -16, y: -16}
- {x: 16, y: -16}
- {x: 16, y: 16}
- name: scorpion boss walk_3
rect:
serializedVersion: 2
x: 96
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline:
- - {x: -8, y: 16}
- {x: -16, y: 14}
- {x: -16, y: -16}
- {x: 16, y: -16}
- {x: 16, y: 7}
- {x: 12, y: 16}
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6a92e97445ac40a43a7a182b47b86de1
timeCreated: 1479597178
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
......@@ -15,17 +15,30 @@ public class Boss : MonoBehaviour {
public float projectileSpeed = 5;
public int health = 100;
public GameObject diety;
public Color damageColor;
public float damageColorSpeed = 8;
private SpriteRenderer sr;
private Animator animator;
GameObject player;
private bool triggered = false;
public float triggerDist = 10f;
// Use this for initialization
void Start () {
waypoints = GameObject.FindGameObjectsWithTag("Waypoint");
rb = GetComponent<Rigidbody2D>();
sr = GetComponent<SpriteRenderer>();
animator = GetComponent<Animator>();
player = GameObject.FindGameObjectWithTag("Player");
PickWaypoint();
rb.isKinematic = true;
}
// Update is called once per frame
void Update () {
if (currentWaypoint) {
if (currentWaypoint && triggered) {
if (Vector2.Distance(transform.position, currentWaypoint.position) < distanceThreshold) {
PickWaypoint();
} else {
......@@ -37,11 +50,14 @@ public class Boss : MonoBehaviour {
if(Time.time > lastAttack) {
lastAttack = Time.time + attackCooldown + Random.Range(0, attackRandom);
StartCoroutine(Attack());
}
Shoot(0);
Shoot(90);
Shoot(180);
Shoot(270);
sr.color = Color.Lerp(sr.color, Color.white, Time.deltaTime * damageColorSpeed);
if(Vector2.Distance(player.transform.position, transform.position) < triggerDist) {
triggered = true;
animator.SetBool("Moving", true);
rb.isKinematic = false;
}
}
......@@ -59,9 +75,12 @@ public class Boss : MonoBehaviour {
}
void GetHit(int amount) {
health -= health;
if (health <= 0) {
Die();
if (triggered) {
health -= health;
sr.color = damageColor;
if (health <= 0) {
Die();
}
}
}
......@@ -69,4 +88,17 @@ public class Boss : MonoBehaviour {
Instantiate(diety, transform.position, Quaternion.identity);
Destroy(gameObject);
}
IEnumerator Attack() {
if (triggered) {
animator.SetBool("Attacking", true);
yield return new WaitForSeconds(0.3f);
Shoot(0);
Shoot(90);
Shoot(180);
Shoot(270);
yield return new WaitForSeconds(0.3f);
animator.SetBool("Attacking", false);
}
}
}
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