Commit dc5f8507 authored by Andrew R Van Buren's avatar Andrew R Van Buren

Merge branch 'character' into 'master'

Character

Added character updates (abilities, water boss, test maps).

See merge request !25
parents 99b88fd0 31a26346
fileFormatVersion: 2 fileFormatVersion: 2
guid: 647a00acb440c0c4aa002d9f0ae2ffd5 guid: 7a81b522c3eaea24ca8fcc228b393f19
folderAsset: yes folderAsset: yes
timeCreated: 1475761198 timeCreated: 1479440498
licenseType: Free licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6d6525803f9c2de4e8233fc51322fdc5 guid: 3fd9c01e8800fc54681146f720a0d04b
folderAsset: yes folderAsset: yes
timeCreated: 1476403153 timeCreated: 1477008945
licenseType: Free licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
......
fileFormatVersion: 2
guid: b3b2f4d882443b4479197c16a3a047f9
timeCreated: 1477616236
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 20fb6f28ca90a4a9492d76f7f0042220
timeCreated: 1478844848
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: afa3b25f0de7541cb9c01e694f6778e1
timeCreated: 1477008989
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9e21addf110434c01b2af828e85594af
timeCreated: 1477612028
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 03f46e5f634d1cd46be9af0180ecd8b6
timeCreated: 1478831718
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 81af49ec04f2d4947bd7fe4ce6e0a52c
timeCreated: 1478833030
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9d62da0ef0f1b3d4a830a1a99cdb161d guid: f58fa132d26ee884c9072fe5a5a7b41a
timeCreated: 1477008563 timeCreated: 1479439382
licenseType: Free licenseType: Free
MonoImporter: MonoImporter:
serializedVersion: 2 serializedVersion: 2
......
using UnityEngine;
using System.Collections;
public class HeroAttackController : MonoBehaviour {
enum ability {fireball, water, others };
private ability currentAbility = ability.fireball;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update(){
if (Input.GetButtonDown("Fire1")){
switch (currentAbility)
{
case ability.fireball:
//Debug.Log("fireball");
break;
default:
Debug.Log("default");
break;
}
}
if (Input.GetButtonDown("Fire2")){
Debug.Log("melee");
}
}
}
...@@ -5,19 +5,26 @@ public class HeroMobility : MonoBehaviour { ...@@ -5,19 +5,26 @@ public class HeroMobility : MonoBehaviour {
public float playerSpeed = 1f; public float playerSpeed = 1f;
private Rigidbody2D playerRB; private Rigidbody2D playerRB;
Animator anim; Animator anim;
private Vector2 lastPos;
public Vector2 deltaPos;
void Start () { void Start () {
playerRB = GetComponent<Rigidbody2D> (); playerRB = GetComponent<Rigidbody2D> ();
anim = GetComponent<Animator> (); anim = GetComponent<Animator> ();
} lastPos = playerRB.position;
}
void FixedUpdate () { // Update is called once per frame
void FixedUpdate () {
Vector2 input = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); Vector2 input = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
playerMove (input); playerMove (input);
} }
void playerMove (Vector2 input){ void playerMove (Vector2 input){
//Controls hero movement in all 8 directions //Controls hero movement in all 8 directions
playerRB.MovePosition((Vector2)transform.position + input*playerSpeed); playerRB.MovePosition((Vector2)transform.position + input.normalized*playerSpeed);
} deltaPos = playerRB.position - lastPos;
lastPos = playerRB.position;
}
} }
...@@ -4,16 +4,18 @@ using System.Collections; ...@@ -4,16 +4,18 @@ using System.Collections;
public class PlayerAnimation : MonoBehaviour { public class PlayerAnimation : MonoBehaviour {
private Animator animator; private Animator animator;
private Vector2 lastInput = new Vector2(1, 1); public Vector2 lastInput = new Vector2(1, 1);
private int horizontalDir = 1; private int horizontalDir = 1;
private HeroMobility hm;
// Use this for initialization // Use this for initialization
void Start () { void Start () {
animator = GetComponent<Animator>(); animator = GetComponent<Animator>();
hm = GetComponent<HeroMobility>();
} }
// Update is called once per frame // Update is called once per frame
void Update () { void LateUpdate () {
AminateMovement(); AminateMovement();
} }
...@@ -31,6 +33,7 @@ public class PlayerAnimation : MonoBehaviour { ...@@ -31,6 +33,7 @@ public class PlayerAnimation : MonoBehaviour {
animator.SetFloat("X", Mathf.Abs(lastInput.x)); animator.SetFloat("X", Mathf.Abs(lastInput.x));
animator.SetFloat("Y", lastInput.y); animator.SetFloat("Y", lastInput.y);
animator.SetFloat("DeltaPos", hm.deltaPos.magnitude);
Vector2 scale = transform.localScale; Vector2 scale = transform.localScale;
scale.x = horizontalDir; scale.x = horizontalDir;
transform.localScale = scale; transform.localScale = scale;
......
fileFormatVersion: 2
guid: 359e4d7f02a7d1c49b10927f003b6eb5
timeCreated: 1479439381
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b2a27dfdd1b09b64a8dda627003eaa13
timeCreated: 1478834903
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: 0d9ab217d1dc41b40ab94fee0e4e38a5
timeCreated: 1478834902
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
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2cc4fed42b3726b408f52d16bef0345b
timeCreated: 1478834903
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
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c3c22475c98b94e4484099aba50fc56a
timeCreated: 1478834903
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
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9b010c00d0171e54a8171c3b7a309f11
timeCreated: 1477614222
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: GADIG_Kamali_WALKDOWN_v9_0
21300002: GADIG_Kamali_WALKDOWN_v9_1
21300004: GADIG_Kamali_WALKDOWN_v9_2
21300006: GADIG_Kamali_WALKDOWN_v9_3
21300008: GADIG_Kamali_WALKDOWN_v9_4
21300010: GADIG_Kamali_WALKDOWN_v9_5
21300012: GADIG_Kamali_WALKDOWN_v9_6
21300014: GADIG_Kamali_WALKDOWN_v9_7
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: -3
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: GADIG_Kamali_WALKDOWN_v9_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: GADIG_Kamali_WALKDOWN_v9_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: GADIG_Kamali_WALKDOWN_v9_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: GADIG_Kamali_WALKDOWN_v9_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: GADIG_Kamali_WALKDOWN_v9_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: GADIG_Kamali_WALKDOWN_v9_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: GADIG_Kamali_WALKDOWN_v9_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: []
- name: GADIG_Kamali_WALKDOWN_v9_7
rect:
serializedVersion: 2
x: 112
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: 2b9a7f44f58787242a0318c229106e99
timeCreated: 1477614230
licenseType: Free