5-3) Creating Collectable Items

시그니천·2024년 6월 6일

[ G01 ] ZigZagRacer

목록 보기
24/26

나의 생각

  • diamonds.prefab

  • diamondPlatform.prefab

  • platFormSpawner에서 플랫폼 변수 선언

  • 둘중 랜덤으로 스폰

  • 점수 얻기

  • characterController.cs

OnCollisionEnter(Collision coll)
{
    if(coll.tag == “diamond”)
    {
          GetScore(5);
    }
}
Private void GetScore(int plusScore)
{
      score += plusScore;
      scoreTex.text = score.ToString();
}

—-

1. Asset 셋팅

  • AssetStore에서 diamond 검색
  • simple Gems Ultimate animated Customizable Pack
  • Reset Position
  • Scale조정
  • color입히기

2. Prefab화

  • Prefabs폴더에 Diamond넣기

3. Animation 스크립트 분석

-scaling
-floating은 빼도 될듯!
-rotationg speed같은거 조절 ㄱㄱ

  • speed는 30정도

4. Diamond에 collider추가

  • Sphere Collider ㄱㅊ할듯
  • Radius조정 ㄱㄱ : 1.8 정도?
  • Is Trigger v

  • 츄르
  • 톰조림
  • 생선
profile
우주최강개발자

0개의 댓글