œ ë‹ˆ‹°ëœ flappy brid...

download œ ë‹ˆ‹°ëœ flappy brid „†…†«„ƒ…³†¯„€…µ(Unity 5.1)

of 110

  • date post

    05-Aug-2015
  • Category

    Technology

  • view

    231
  • download

    3

Embed Size (px)

Transcript of œ ë‹ˆ‹°ëœ flappy brid...

1. Flappy Bird & http://ivis.cwnu.ac.kr/tc/dongupak/ 1 2. Flappy Bird ? Dong Nguyen iOS, 2 3. Flappy Bird ? http://www.youtube.com/watch?v=fQoJZuBwrkU http://www.youtube.com/watch?v=sf2nFL9Z3v0 http://www.youtube.com/watch?v=UZXWp83gtog 3 4. FlappyBrid Cactus (GameManager) GUI() Intro,GameOver Scene 4 5. 5 6. 5.1 Project FlappyBird http://ivis.cwnu.ac.kr/tc/dongupak/263 Resource Project Import . , , iTween Tweening script . 6 7. 7 8. Drag & Drop 8 9. Hierarchy Plane bgBack, bgGround 9 10. Assets/Textures/ForLoop bg_2 bgBack, Ground bgGround Position: Rotation: Scale: Unlit/Transparent: Tilling: Offset: 10 11. Assets/Textures/ForLoop Ground BG_ground 11 12. Orthographic: Size 3- 12 13. 13 14. (ScrollMove) Project Folder Script 14 15. (ScrollMove) Project Create-> C# Script *ScrollMove.cs //targetOffset Offset ScrollMove.cs bgBack,bgGround 15 16. (ScrollMove) bgBack -0.1 bgGround -3 16 17. . 17 18. 18 19. Create -> Create Empty Hierarchy GameObject Project Sprite cactus GameObject 3 19 20. GameObject CACTUS 2 Cactus, 1 Goal Cactus 2 Goal 1 Cactus Goal 20 21. Goal Sprite Renderer . Position Cactus Goal , Goal (rendering) 21 22. (CactusMove) // // //y (x) -6 OnEnable() : Start() 22 23. (CactusMove) 23 24. 24 25. Prefab Prefab Prefab - 25 26. (Prefab) Script CACTUS Project Prefab ? 26 27. Flappy Bird GameObject->Create Empty BIRD Sprite bird_A_01 BIRD Bird 27 28. Flappy Bird Inspector Add Component Animator( ) Bird 28 29. Flappy Bird Animation Bird Animator Controller 29 30. 30 31. Bird.cs // // // // Awake // LookDirectionY : GetComponents 31 32. Bird.cs Bird.cs BIRD 32 33. BIRD Bird.cs Bird Bird.cs ImageBird . 33 34. Flappy Bird(Bird.cs) BIRD rigidbody . 34 35. 35 36. (GameManager.cs) GameObject MANAGER GameManager.cs MANAGER . 36 37. GameManager? , , . , , 37 38. (GameManager.cs) // //InvokeRepeating : // cactus // ready 38 39. (Tag ) Cactus Inspector -> Add Tag Tag 39 40. Tag? 40 41. (Tag ) Goal Cactus Cactus Cactus Goal Goal 41 42. (Collider ) CACTUS Box Collider 42 43. (Collider ) Is Trigger ON Box Collider Size Z 10 CACTUS prefab 43 44. (Collider ) 44 45. (Collider ) Prefab CACTUS GameManager Cactus 45 46. - 46 47. (Collider ) BIRD , Add Component Sphere Collider Is Trigger OFF Radius 0.35 47 48. (Collider ) bgGround IsTrigger ON Cactus 48 49. Collider Is Trigger Is Trigger On Is Trigger On Trggering Is Trigger Off Bird 49 50. (Collider ) bgBack Box Collider is Trigger OFF 50 51. Is Trigger - On 51 52. Is Trigger - Off 52 53. (OnTriggerEnter) OnTriggerEnter() is Trigger On Tag Cactus *Bird.cs 53 54. OnTriggerEnter Collider Is Trigger On OnTriggerEnter Collider Collider Is Trigger Off 54 55. (,) BIRD use Gravity -> 55 56. (,) ready true UseGravity GameManger.cs GameOver() MakcCactus Invoke 56 57. (,) Game Play Game Ready Game End ready = true end = false ready = false end = false ready = false end = true 57 58. (,) // end false . Bird.cs 58 59. (,) Game Play ready = false end = false 59 60. (,) Cactus GameManager GameOver() . Bird.cs GameManager.cs Game Play Game End ready = false end = false ready = false end = true 60 61. (iTween) Bob Berkebile . 61 62. (iTween) iTween.cs Script . GameManager.cs GameOver() iTween . . 62 63. (iTween) x,y 0.2 0.5 . 63 64. Flappy Bird . 64 65. (Jump Sound) BIRD Add Component Audio Source 65 66. (Jump Sound) Audio Source Audio Clip Sounds Jump 66 67. (Jump Sound) // Play() Bird.cs 67 68. (Death, Goal) Bird.cs GameManager.cs 68 69. (Death, Goal) MANAGER Audio Source 69 70. (Death, Goal) Death Sound Goal Sound 70 71. CACTUS CACTUS 71 72. Game end 72 73. GUI , 73 74. Score Text Mesh Score Add Component Text Mesh Empty GameObject Score GUI Empty GameObject GUI 74 75. Score() slkscre 75 76. 76 77. GUI(GameManager.cs) //Goal 1 77 78. GUI() MANAGER GameManager Score Text Score 78 79. Intro Scene Sprite ready ready_image GUI ready GetReady ready_image ReadyTap 79 80. Intro Scene Game Position Scale . 80 81. Intro Scene GameManger.cs GameManager.cs Alpha 0.5 0 . 81 82. Intro Scene 82 83. BIRD Score 83 84. Intro Scene 0.5 . 84 85. GameOver Scene GameOver GUI 85 86. GameOver Scene GameOver GetReady 1 ( 0 ) 86 87. GameOver Scene GameManager.cs GameOverImage iTween alpha 1 255 . (-> ) GameManager.cs 87 88. GameOver Scene GameOver image Game Over Image . 88 89. 89 90. 1. FinalWindow 2.Finish_Window . FinishWindow 90 91. Score (Comm+D) BestScore,FinalScore FinalWindow 91 92. FinalWindow() FinishWindow() BestScore FinalScore 92 93. Perspective Orthographic 93 94. Scene Game 94 95. iTween (finalWindow) (MoveTo) . GameManager.cs 95 96. MANAGER 96 97. PlayButton FinalWindow 97 98. PlayButton Inspector Add Component Box Collider 98 99. Project C# ResetScene ResetScene.cs 99 100. PlayButton ResetScene 100 101. new FinalWindow ImageNew BEST 101 102. GameManager.cs . GameManager.cs (best score) NEW bestScoreText 102 103. Score BestScore ImageNew Active Active . GameManager.cs 103 104. PlayerPrefs PlayerPrefs . 104 105. FinalScore Final Score Text BestScore Best Score Text ImageNew Image New GameManage.cs Final Score Text FinalScorer 105 106. GameOver() Tag : Cactus Tag : Cactus GameOver() GameOver() GameOver() GameOver() 106 107. GameOver() GameManager.cs 107 108. 108 109. Cactus , Cactus Gold Goal . Gold 5 109 110. Q & A dongupak@gmail.com 110