1
0

Spider Controller AGAIN!!!!!!!!!!!

This commit is contained in:
MoMack20 2016-01-31 12:28:43 -05:00
parent 60df0e3c4d
commit a9184abb34
5 changed files with 20 additions and 0 deletions

View File

@ -6,6 +6,7 @@ using System;
public class Enemy : Controller{
public bool isAir;
private state currentState;
private Animator mAnimator;
public LayerMask enemyMask;
public bool rightdirection;
public float[] time = new float[10];
@ -14,11 +15,14 @@ public class Enemy : Controller{
void Start ()
{
print("start");
mAnimator = GetComponent<Animator> ();
changestate(new idle());
}
// Update is called once per frame
void Update ()
{
mAnimator.SetFloat ("Speed", GetComponent<Rigidbody2D> ().velocity.magnitude);
//mAnimator.SetFloat ("Player Health", GameObject.FindWithTag ("Scene_Object").GetComponent<Rigidbody2D>());
currentState.Execute();
}
public void changestate(state newstate)

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a85a73eb6330eaa4fb472f22a8a78955
timeCreated: 1454227347
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bdb824d553c6df645b8240a915ac7828
timeCreated: 1454258941
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant: