prepped aiming
This commit is contained in:
8
Assets/Scripts/Enemies.meta
Normal file
8
Assets/Scripts/Enemies.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c45f05892f2ff27429f6adc9e95855b9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
27
Assets/Scripts/Enemies/DummyComponent.cs
Normal file
27
Assets/Scripts/Enemies/DummyComponent.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DummyComponent : MonoBehaviour
|
||||
{
|
||||
private Animator anim;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
anim = this.GetComponentInParent<Animator>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnCollisionEnter(Collision collision)
|
||||
{
|
||||
if(collision.gameObject.GetComponent<BulletComponent>() != null)
|
||||
{
|
||||
anim.Play("DummyFall");
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/Enemies/DummyComponent.cs.meta
Normal file
11
Assets/Scripts/Enemies/DummyComponent.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7704c7887a840104bbb7774436810b7c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -42,6 +42,10 @@ public class PlayerAnimationController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void Hit()
|
||||
{
|
||||
animController.SetTrigger("WasHit");
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@ -54,7 +58,8 @@ public class PlayerAnimationController : MonoBehaviour
|
||||
{
|
||||
animController.SetBool("IsCarrying", interactionHandler.IsCarrying);
|
||||
animController.SetBool("HasGun",interactionHandler.GunEnabled);
|
||||
print("carrying:" + interactionHandler.IsCarrying + " running:"+animController.GetBool(runningParameter)+" running speed:" + animController.GetFloat(runningSpeedParameter));
|
||||
|
||||
//print("carrying:" + interactionHandler.IsCarrying + " running:"+animController.GetBool(runningParameter)+" running speed:" + animController.GetFloat(runningSpeedParameter));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,6 +205,9 @@ public class PlayerInteractionHandler : MonoBehaviour
|
||||
if (this.GunEnabled)
|
||||
{
|
||||
this.DisableFlashlight();
|
||||
|
||||
float aimAxis = Input.GetAxis("Aim");
|
||||
print("Aim:" + aimAxis);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user