using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Runtime.Serialization.Formatters.Binary; using UnityEngine.InputSystem; [System.Serializable] public class Weapons { public bool isUseable; // °ø°Ý °¡´É ¿©ºÎ public bool isUse; // °ø°ÝÁß ¿©ºÎ //public PlayerAttacks.classType WeaponType; // ¾î´À ¹«±âÀΰ¡? public int WeaponLevel; public int atkCnt; // °ø°Ý Ƚ¼ö public float WeaponDmg; // ¹«±â µ¥¹ÌÁö public string animTrigger; // ¾Ö´Ï¸ÞÀÌ¼Ç ½ÇÇà Æ®¸®°Å À̸§ } public class PlayerAttacks : MonoBehaviour { private Animator animator; bool issAtk = false; // ¾à°ø Ç÷¡±× bool isaAtk = false; // °­°ø Ç÷¡±× public Weapons[] weaponInfos; Weapondata weaponBase; public enum Types { scissor, needle, lighter}; void Start() { //Animator °¡Á®¿À±â animator = GetComponent(); weaponBase = GetComponent(); } void Update() { } public void OnsAtk(InputValue value) { if (value.isPressed && !weaponInfos[0].isUse) { issAtk = true; animator.SetTrigger("sAtk"); Debug.Log(" ¾à°ø°Ý! "); } } public void OnaAtk(InputValue value) { if (value.isPressed && !weaponInfos[0].isUse) { isaAtk = true; animator.SetTrigger("aAtk"); Debug.Log(" °­°ø°Ý! "); } } public IEnumerator ableAtk(float sDamage, float aDamage, float frontdelaytime, float afterdelaytime) { weaponInfos[wea] } }