bool isReloadCompleted; // 장전이 완료되었는지? private void Start() { S_GunInfo defaultGunInfo = CS_DataBase.Instance.GetGunInfo("Rifle"); // 정보가 없다면 '권총'을 흉내낸 정보가 담긴다. bulletPrefab = Resources.Load("Prefabs/Bullet") as GameObject; SetGunInfo(defaultGunInfo); CS_Managers.Instance.InputManager.joystick.ED_Standby += UpdateRemainingTime; CS_Managers.Instance.InputManager.joystick.ED_Action += UpdateElapsedTime; CS_Managers.Instance.InputManager.joystick.ED_StickDown += Reload; }
public void SetGunInfo(S_GunInfo gunInfo) { shotMode = gunInfo.shotMode; effectiveRange = gunInfo.effectiveRange; reboundDegree = gunInfo.reboundDegree; delay = gunInfo.delay; delayInGroupMode = gunInfo.delayInGroupMode; maxBulletNum = gunInfo.maxBulletNum; curBulletNum = maxBulletNum; reloadTime = gunInfo.reloadTime; isReloadCompleted = false; elapsedTime = 0.0f; }