Spider Controller AGAIN!!!!!!!!!!!
This commit is contained in:
parent
60df0e3c4d
commit
a9184abb34
@ -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)
|
||||
|
BIN
Assets/Sprites/SpriteAnimations/SpiderController.controller
Normal file
BIN
Assets/Sprites/SpriteAnimations/SpiderController.controller
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a85a73eb6330eaa4fb472f22a8a78955
|
||||
timeCreated: 1454227347
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sprites/SpriteAnimations/SpiderFab.prefab
Normal file
BIN
Assets/Sprites/SpriteAnimations/SpiderFab.prefab
Normal file
Binary file not shown.
8
Assets/Sprites/SpriteAnimations/SpiderFab.prefab.meta
Normal file
8
Assets/Sprites/SpriteAnimations/SpiderFab.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdb824d553c6df645b8240a915ac7828
|
||||
timeCreated: 1454258941
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user