delete script
This commit is contained in:
parent
e81cab42e0
commit
dba218cc7e
|
@ -1,34 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using UnityEngine;
|
||||
|
||||
public class animationStateControler : MonoBehaviour
|
||||
{
|
||||
Animator animator;
|
||||
int isWalkingHash;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
animator = GetComponent<animator>();
|
||||
isWalkingHash = Animator.stringToHash("isWalking");
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
bool isWalking = animator.GetBool("isWalking");
|
||||
bool forwardPressed = Input.GetKey('w');
|
||||
if (!isWalking && forwardPressed)
|
||||
{
|
||||
animator.SetBool(isWalking, true);
|
||||
}
|
||||
if (isWalking && !forwardPressed)
|
||||
{
|
||||
animator.SetBool(isWalking, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e25e06abe813c7648be3972ab5457391
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue