Commit ddcf4c90 authored by Luke A Smith's avatar Luke A Smith

Merge branch 'character' into 'master'

Character

Basic character functionality is in place.

See merge request !4
parents 236b90fc c0f97470
fileFormatVersion: 2
guid: 3fd9c01e8800fc54681146f720a0d04b
folderAsset: yes
timeCreated: 1477008945
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1e017f03500f8e6488ddf22b93a4fc64
timeCreated: 1477008948
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 67353cb7d3506f644a7bba4b5823d726
timeCreated: 1475801963
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
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");
}
}
}
fileFormatVersion: 2
guid: 9d62da0ef0f1b3d4a830a1a99cdb161d
timeCreated: 1477008563
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
public class HeroMobility : MonoBehaviour {
public float playerSpeed = 1f;
private Rigidbody2D playerRB;
Animator anim;
// Use this for initialization
void Start () {
playerRB = GetComponent<Rigidbody2D> ();
anim = GetComponent<Animator> ();
}
// Update is called once per frame
void Update () {
Vector2 input = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
playerMove (input);
}
void playerMove (Vector2 input){
//Controls hero movement in all 8 directions
playerRB.MovePosition((Vector2)transform.position + input*playerSpeed);
}
}
fileFormatVersion: 2
guid: e247c9d5f5c5cd6468589367fbee44ef
timeCreated: 1477008563
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
public class PlayerAnimation : MonoBehaviour {
private Animator animator;
private Vector2 lastInput = new Vector2(1, 1);
private int horizontalDir = 1;
// Use this for initialization
void Start () {
animator = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
AminateMovement();
}
void AminateMovement() {
Vector2 input = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
if (Mathf.Abs(input.x) > 0 || Mathf.Abs(input.y) > 0) {
lastInput.x = input.x;
lastInput.y = input.y;
}
if(lastInput.x < 0 && input.y == 0) {
horizontalDir = -1;
}else {
horizontalDir = 1;
}
animator.SetFloat("X", Mathf.Abs(lastInput.x));
animator.SetFloat("Y", lastInput.y);
Vector2 scale = transform.localScale;
scale.x = horizontalDir;
transform.localScale = scale;
}
}
fileFormatVersion: 2
guid: 3609f8378d24dab4bacd67285731b97a
timeCreated: 1475802984
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5b9c12fe7f68b5545adc41aae6f68d4e
timeCreated: 1477007537
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: 0a69ba62eeef7ba4cb36bdce415247e4
timeCreated: 1477007537
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: 2dfb4b84621bbb146a6307f8f097f567
timeCreated: 1477007537
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: b5c8349c3dcc74544a2c657ffc029ae9
folderAsset: yes
timeCreated: 1475801899
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 682407675e213fe43b48bcc2b4884eee
folderAsset: yes
timeCreated: 1475802422
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2db7b42c28f0d9041a3cde7edd02e518
timeCreated: 1475801918
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ed5a94819a8e0d549afbec0dfddf7ebf
timeCreated: 1475802095
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 77f53e8beee59004491d566997b69ce1
timeCreated: 1475802383
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 62b4f2912b3967943920cc1660c1634b
timeCreated: 1475802353
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
......@@ -7,7 +7,7 @@ TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
linearTexture: 0
correctGamma: 0
fadeOut: 0
......@@ -54,4 +54,4 @@ TextureImporter:
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
assetBundleVariant:
\ No newline at end of file
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