Unity 최종 프로젝트 - 6

이준호·2024년 1월 19일
0

📌 Unity 최종 프로젝트



📌 추가사항

➔ Bio Base (HGZ - 21)

IHit interface

  • 파라미터로 자신의 현재 체력과 상대방의 공격력을 받는 메소드 존재.

Field Variables

  • 체력, 이동속도 - 애니메이터, 콜라이더, 리지드바디

Base Initalize

  • 부모(Entitiy)의 Awake에서 초기화를 진행할 목록 재정의

Bio Component Setup

  • Bio에서 정의된 Component들 할당.

  • override하여 상속받는 생명체들의 클래스에서 더 필요한 Component들 추가하여 재정의 가능.

// Hit 메서드 강제 (인터페이스)
public interface IHit
{
    public void Hit(float myCurrentHealth, float opponentAttackDamage);
}
public class Bio : Entity
{
    #region Field Variables
    
    // (필수사항) 체력, 이동속도,
    // (고려사항) 공격력, EXP, Vector3, ##상호작용##
    protected float _health;
    protected float _moveSpeed;
    
    // (필수사항) 애니메이터, 콜라이더, 리지드바디
    protected Animator _animator;
    protected Collider _collider;
    protected Rigidbody _rigidbody;
    
    #endregion

    
    
    #region Base Initialize
    
    protected override bool InitializeAwake()
    {
        base.InitializeAwake();
        return CreatSetupComponent(_gameObject);
    }
    
    #endregion

    
    
    #region Bio Component Setup
    
    /// <summary>
    /// CreatSetupComponent 메소드에 자신의 gameObject를 넣어서 Component들 할당.
    /// override하여 더 필요한 Component들을 추가가능.
    /// 추가를 고려하여 생성자로 만들진 않았습니다.
    /// </summary>
    protected virtual bool CreatSetupComponent(GameObject gameObject)
    {
        if (gameObject == null)
        {
            DebugLogger.LogError($"GameObject missing {_name}");
            return false;
        }
        
        gameObject = this.gameObject;
        _animator = gameObject.GetComponent<Animator>();
        _collider = gameObject.GetComponent<Collider>();
        _rigidbody = gameObject.GetComponent<Rigidbody>();
        
        return true;
    }
    
    #endregion
    
}











📌 현재 진행상황

박정혁

  • InventoryModular (HGZ-25)
  • Item Modular (HGZ-32)



장성규

PlayerData (HGZ-19)

  1. Json데이터 타입이 모두 string으로 저장되는 것을 발견
    -> 원하는 타입에 맞게 형 변환을 시켜주는 ConvertValue 메서드 추가
  2. Manager_data.cs
    -> 딕셔너리로 데이터를 받아 올 수 있는 LoadDataToDictionary 메서드 생성
  3. Modules 생성
    .cs(Damage, Defense, ExperiencePoint, HealthPoint, Hunger, Level, MoveSpeed,Thirst, UserName)
  4. PlayerData
    #region -> Fields, Constructor, Initialize 수정

**Data Manager (HGZ-6) - fix CsvToJsonMenu.cs (수정)**

CsvToJsonMenu.cs
• 일반적으로 쓰는 csv파일 형식과
• 중첩된구조를 필요로 하는 csv파일 형식을 구분할 수 있도록 수정하였습니다.




송희성

Base Scene (HGZ-16)

SceneBase.cs
• 모든 씬에 베이스가 될 스크립트
• 씬 스크립트들은 해당 베이스를 상속 받아야 한다.
폴더 변경
• Core => Core
Tets.cs 삭제
테스트 내용 추가
• Addressable Group 확인
• TEST Sample.unity (Scene) 확인


Addressable Manager (HGZ-31)

Addressable Management System

  • UniTask를 활용한 비동기 방식

    • GitHub - Cysharp/UniTask: Provides an efficient allocation free async/await integration for Unity.
    • 모든 Addressable 관련 메서드들은 비동기로 진행
  • BaseScene과 연관 되어 있음 HGZ-16: Base Scene(완료됨)

  • 추 후 LoadingScene과 SceneManager(Addressable)과 결합한다면 내용이 바뀔 수 있음

  • Alpha Version (1.0)
    • InitializeAsync() → 어드레서블을 사용하기 위한 밑 작업
    • LoadLocationAsync(object key, Type type = null) → 리소스 로케이션을 들고오는 메서드
    • LoadAllAssetAsync(string label) → 에셋 전체를 캐싱하는 메서드
profile
No Easy Day

0개의 댓글