Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PlayMaker入門 (Version 1.7.8)

360 views

Published on

2016/1頃に作成した資料をそのままの形で公開します。そのためUnityのバージョンもPlay Makerのバージョンも古いのでご注意ください。

Published in: Technology
  • Be the first to comment

  • Be the first to like this

PlayMaker入門 (Version 1.7.8)

  1. 1. 2016/01
  2. 2. 2016/1Copyright(C) 2016 . All Rights Reserved 2
  3. 3. 2016/1Copyright(C) 2016 . All Rights Reserved 3
  4. 4. } PlayMaker Unity 2016/1Copyright(C) 2016 . All Rights Reserved 4
  5. 5. Unity 5.2.3f1 PC Windows 8.1(7 ) PlayMaker https://www.assetstore.unity3d.com/jp/#!/content/368 1.7.8(1.8.0 ) 2016/1Copyright(C) 2016 . All Rights Reserved 5
  6. 6. 1. PlayMaker 2. - 3. 4. 5. 6. 7. 8. iTween 9. 10. 1 11. 2 12. 13. Add-On 2016/1Copyright(C) 2016 . All Rights Reserved 6
  7. 7. 2016/1Copyright(C) 2016 . All Rights Reserved 7
  8. 8. } ◦ ◦ ◦ ◦ ◦ ◦ PlayMaker ◦ C# PlayMaker 2016/1Copyright(C) 2016 . All Rights Reserved 8
  9. 9. } ◦ / ◦ UI/ ◦ iTween ◦ AI ◦ UnityEngine API 2016/1Copyright(C) 2016 . All Rights Reserved 9
  10. 10. } ◦ (Template Export ) ◦ ◦ } ◦ ◦ ◦ PlayMaker ◦ ◦ Tween 2016/1Copyright(C) 2016 . All Rights Reserved 10
  11. 11. } FSM ) UML } ◦ ◦ ◦ ◦ FSM 2016/1Copyright(C) 2016 . All Rights Reserved 11
  12. 12. } ◦ – ◦ – ) ◦ – ◦ – (Vector3 ) (float ) 2016/1Copyright(C) 2016 . All Rights Reserved 12
  13. 13. } Asset Store PlayMaker - } Web Browser URL ◦ https://www.assetstore.unity3d.com/jp/#!/content/368 } 2016/1Copyright(C) 2016 . All Rights Reserved 13
  14. 14. } 2016/1Copyright(C) 2016 . All Rights Reserved 14
  15. 15. } PlayMaker 1.7.x ◦ 2016/1 PlayMaker – 1.7.8.4: – 1.8.0 beta: Unity5.3 ◦ 1.7.8.4 } Unity PlayMaker [PlayMaker]-[Welcome Screen] 2016/1Copyright(C) 2016 . All Rights Reserved 15
  16. 16. } Install PlayMaker 2016/1Copyright(C) 2016 . All Rights Reserved 16
  17. 17. } Install PlayMaker 1.7.8.4 2016/1Copyright(C) 2016 . All Rights Reserved 17
  18. 18. } I Made a Backup. Go Ahead! 2016/1Copyright(C) 2016 . All Rights Reserved 18
  19. 19. } Import 2016/1Copyright(C) 2016 . All Rights Reserved 19
  20. 20. } OK 2016/1Copyright(C) 2016 . All Rights Reserved 20
  21. 21. } Show At Startup 2016/1Copyright(C) 2016 . All Rights Reserved 21
  22. 22. } PlayMaker Project View 2016/1Copyright(C) 2016 . All Rights Reserved 22
  23. 23. 2016/1Copyright(C) 2016 . All Rights Reserved 23
  24. 24. } ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 24
  25. 25. } [PlayMaker]-[PlayMaker Editor] } [Preferences] 2016/1Copyright(C) 2016 . All Rights Reserved 25
  26. 26. } Language(bate) [English] [Japanese] 2016/1Copyright(C) 2016 . All Rights Reserved 26
  27. 27. } PlayMaker Editor / ( ) } F1 (F1) } 2016/1Copyright(C) 2016 . All Rights Reserved 27
  28. 28. } 2016/1Copyright(C) 2016 . All Rights Reserved 28
  29. 29. } PlayMaker GameObject ◦ (3D ) ◦ Cube ◦ Position (0, 0, 0) ◦ Cube ◦ PlayMaker Editor [ ] 2016/1Copyright(C) 2016 . All Rights Reserved 29
  30. 30. } 2016/1Copyright(C) 2016 . All Rights Reserved 30
  31. 31. } 2016/1Copyright(C) 2016 . All Rights Reserved 31
  32. 32. } State 1 State 1 On ENTER (RETURN ) 2016/1Copyright(C) 2016 . All Rights Reserved 32
  33. 33. } PlayMaker Editor } Off 2016/1Copyright(C) 2016 . All Rights Reserved 33
  34. 34. } } On ◦ ◦ [ ] 2016/1Copyright(C) 2016 . All Rights Reserved 34
  35. 35. } Activate Game Object Activate Game Object [ ] 2016/1Copyright(C) 2016 . All Rights Reserved 35
  36. 36. } 2016/1Copyright(C) 2016 . All Rights Reserved 36
  37. 37. } Activate Game Object Game Object Use Owner GameObject) Specify Game Object(Game Object ) 2016/1Copyright(C) 2016 . All Rights Reserved 37
  38. 38. } None (GameObject) Hierarchy View Directional Light D&D 2016/1Copyright(C) 2016 . All Rights Reserved 38
  39. 39. } ◦ Cube PlayMaker Editor PlayMaker ◦ (On Off) ◦ On Activate game Object Activate game Object GameObject GameObject ( ) } 2016/1Copyright(C) 2016 . All Rights Reserved 39
  40. 40. } Cube PlayMaker Editor 2016/1Copyright(C) 2016 . All Rights Reserved 40
  41. 41. } Directional Light Active On/Off } } } PlayMaker Editor On } Turn Off ENTER (RETURN ) 2016/1Copyright(C) 2016 . All Rights Reserved 41
  42. 42. } 2016/1Copyright(C) 2016 . All Rights Reserved 42
  43. 43. } On [ ]-[Turn Off] 2016/1Copyright(C) 2016 . All Rights Reserved 43
  44. 44. } On Turn Off } ! Turn Off Off D&D 2016/1Copyright(C) 2016 . All Rights Reserved 44
  45. 45. } PlayMaker Editor On } [ ] ( xxx yyy ) } X } } Input } Get Button Down [ ] 2016/1Copyright(C) 2016 . All Rights Reserved 45
  46. 46. } Get Button Down } Get Button Down Send Event Turn Off 2016/1Copyright(C) 2016 . All Rights Reserved 46
  47. 47. } Scene View On Off 2016/1Copyright(C) 2016 . All Rights Reserved 47
  48. 48. } 1 ◦ Off On } 2016/1Copyright(C) 2016 . All Rights Reserved 48
  49. 49. } 2 ◦ On/Off Directional Light Activate( )/Deactivate( ) } 2016/1Copyright(C) 2016 . All Rights Reserved 49
  50. 50. } Input Get Mouse Button Down Play Maker 2016/1Copyright(C) 2016 . All Rights Reserved 50
  51. 51. } ◦ PlayMaker Animation ◦ PlayMaker Unity4.0 Mecanim(Animator ) ◦ Add-on – https://hutonggames.fogbugz.com/default.asp?W1031 ◦ 2016/1Copyright(C) 2016 . All Rights Reserved 51
  52. 52. } Cube 3 } Door Material Door 2016/1Copyright(C) 2016 . All Rights Reserved 52 Position Scale Door (0, 1.5, 0) (3, 3, 0.1) Wall (3, 1.5, -0.1) (3, 3, 0.1) Wall (-3, 1.5, -0.1) (3, 3, 0.1)
  53. 53. } Door [Window]-[Animation] } Animation View [Create] 2016/1Copyright(C) 2016 . All Rights Reserved 53
  54. 54. } Open } Animation View [Add Property] [Transform]-[Positon] [+] 2016/1Copyright(C) 2016 . All Rights Reserved 54
  55. 55. } Open Positon.x } Animation View 2016/1Copyright(C) 2016 . All Rights Reserved 55 Positon.x 0 0 60 -2.9
  56. 56. } Close } Animation View Open [Create New Clip...] 2016/1Copyright(C) 2016 . All Rights Reserved 56 Animation Clip
  57. 57. } Close } Animation View [Add Property] [Transform]-[Positon] [+] 2016/1Copyright(C) 2016 . All Rights Reserved 57
  58. 58. } Close Positon.x } Animation View 2016/1Copyright(C) 2016 . All Rights Reserved 58 Positon.x 0 -2.9 60 0
  59. 59. } Animation View Project View 2016/1Copyright(C) 2016 . All Rights Reserved 59
  60. 60. } Open Close Loop Loop Loop } Open Inspector View Loop Time Close 2016/1Copyright(C) 2016 . All Rights Reserved 60
  61. 61. } Animator Controller Door Animator Controller 2016/1Copyright(C) 2016 . All Rights Reserved 61
  62. 62. } 2016/1Copyright(C) 2016 . All Rights Reserved 62
  63. 63. } Entry Init (Init [Set as Layer Default State] ) 2016/1Copyright(C) 2016 . All Rights Reserved 63
  64. 64. } Animator Controller Next } Parametes Trigger New Trigger Next 2016/1Copyright(C) 2016 . All Rights Reserved 64
  65. 65. } Init=>Open Open=>Close Close=>Open Transition [Make Transiton] ) 2016/1Copyright(C) 2016 . All Rights Reserved 65
  66. 66. } Transition Inspector View Conditions + Parameter Next 2016/1Copyright(C) 2016 . All Rights Reserved 66
  67. 67. } Door PlayMaker Editor } ◦ Close ◦ Close to Open ◦ Open ◦ Open to Close } 2 ◦ Open door ◦ Close door 2016/1Copyright(C) 2016 . All Rights Reserved 67
  68. 68. } 2016/1Copyright(C) 2016 . All Rights Reserved 68
  69. 69. } ◦ Close – Open door ◦ Close to Open – FINISHED ◦ Open – Close door ◦ Open to Close – FINISHED } Close=>Close to Open=>Open=>Open to Close=>Close 2016/1Copyright(C) 2016 . All Rights Reserved 69
  70. 70. } ( ) } [File]-[Save Scene] [Ctrl + S] } PlayMaker Animator Controller ◦ https://hutonggames.fogbugz.com/default.asp?W1031 } AnimatorProxy.unitypackage } Animator 2016/1Copyright(C) 2016 . All Rights Reserved 70
  71. 71. } Close Close to Open ◦ Get Button Down ◦ Send Event Close door } Close to Open Open ◦ [Animator]-[Set Animator Trigger] ◦ Trigger Next 2016/1Copyright(C) 2016 . All Rights Reserved 71
  72. 72. } Open Open to Close ◦ Get Button Down ◦ Send Event Open door } Open to Close Close ◦ [Animator]-[Set Animator Trigger] ◦ Trigger Next } 2016/1Copyright(C) 2016 . All Rights Reserved 72
  73. 73. } PlayMaker } PlayMaker } GameObject Material Mecanim Unity 2016/1Copyright(C) 2016 . All Rights Reserved 73
  74. 74. 2016/1Copyright(C) 2016 . All Rights Reserved 74
  75. 75. 2016/1Copyright(C) 2016 . All Rights Reserved 75
  76. 76. } 2016/1Copyright(C) 2016 . All Rights Reserved 76
  77. 77. } PlayMaker ◦ https://hutonggames.fogbugz.com/default.asp?W1182 } Game Design with Playmaker and Unity Assets.unitypackage 2016/1Copyright(C) 2016 . All Rights Reserved 77
  78. 78. } I Made a Backup. Go Ahead! No Thanks [Asstes]- [Run API Updater] 2016/1Copyright(C) 2016 . All Rights Reserved 78
  79. 79. } Plane Position ( 0, 0, 0 ) } [Assets]-[Import Assets]-[Characters] } [Standard Assets]-[Characters]- [ThirdPersonCharacter]-[Prefabs] ThirdPersonController Hierarchy D&D } Position ( 0, 0, -3 ) 2016/1Copyright(C) 2016 . All Rights Reserved 79
  80. 80. } Close Open Get Button Down 2016/1Copyright(C) 2016 . All Rights Reserved 80
  81. 81. } Close Open Physics - Trigger Event } Close ◦ Trigger: On Trigger Enter ◦ Send Event: Open door } Open ◦ Trigger: On Trigger Exit ◦ Send Event: Close door 2016/1Copyright(C) 2016 . All Rights Reserved 81
  82. 82. } Door Box Collider } Box Collider Is Trigger } Box Collider Size (1, 1, 30) 2016/1Copyright(C) 2016 . All Rights Reserved 82
  83. 83. } Door Collider 2016/1Copyright(C) 2016 . All Rights Reserved 83
  84. 84. } GameObject } DoorTrigger } DoorTrigger Position( 0, 1.5, 0 ), Scale( 3, 3, 0.1 ) } DoorTrigger Box Collider } DoorTrigger Box Collider IsTrigger } Door Box Collider Box Collider 2016/1Copyright(C) 2016 . All Rights Reserved 84
  85. 85. } GameObject } DoorGroup } Positon ( 0, 0, 0 ) } Door DoorTrigger 2016/1Copyright(C) 2016 . All Rights Reserved 85
  86. 86. } Door PlayMaker Editor } } DoorTemplate 2016/1Copyright(C) 2016 . All Rights Reserved 86
  87. 87. } Door PlayMaker Editor } 2016/1Copyright(C) 2016 . All Rights Reserved 87
  88. 88. } DoorTrigger PlayMaker Editor } [ ]-[ ]-[DoorTemplate] FMS 2016/1Copyright(C) 2016 . All Rights Reserved 88
  89. 89. } Close to Open Open to Close Set Animation Trigger GameObject Use Owner } Specify Game Object None (GameObject) Door D&D 2016/1Copyright(C) 2016 . All Rights Reserved 89
  90. 90. } 2016/1Copyright(C) 2016 . All Rights Reserved 90
  91. 91. } Close to Open Play Sound } Audio Clip [Playmaker Tutorials]-[Audio]- [Bell_High] } Open to Close Play Sound } Audio Clip [Playmaker Tutorials]-[Audio]- [Bell_Low] 2016/1Copyright(C) 2016 . All Rights Reserved 91
  92. 92. } 2016/1Copyright(C) 2016 . All Rights Reserved 92
  93. 93. } [Playmaker Tutorials]-[Scenes]-[03 - Trigger] 2016/1Copyright(C) 2016 . All Rights Reserved 93
  94. 94. } Unity Collider Trigger } Trigger } } Unity5 Mecanim Animator Controller } 2016/1Copyright(C) 2016 . All Rights Reserved 94
  95. 95. 2016/1Copyright(C) 2016 . All Rights Reserved 95
  96. 96. } Vector3 / } } } PlayMaker PlayMaker Editor } FSM ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 96
  97. 97. } 2016/1Copyright(C) 2016 . All Rights Reserved 97
  98. 98. } ◦ Float( ) ◦ Int( ) ◦ Bool( ) ◦ GameObject ◦ String( ) ◦ Vector2( ) ◦ Vector3( ) ◦ Color( ) ◦ Rect( GUI ) ◦ Material ◦ Texture ◦ Quaternion( ) ◦ Object 2016/1Copyright(C) 2016 . All Rights Reserved 98
  99. 99. 2016/1Copyright(C) 2016 . All Rights Reserved 99
  100. 100. } ( ) ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 100
  101. 101. } [Ctrl + N](Cmd + N) } [Ctrl + S] (Cmd + S) ( Example/Chapter05/Scene05 ) } ThridPersonController Position( 0, 0, -3) } Plane Position( 0 , 0, 0 ) 2016/1Copyright(C) 2016 . All Rights Reserved 101
  102. 102. } Project View [Playmaker Tutorials]-[Objects]- [Vase] Hierarchy D&D Position ( 0, 0, 0 ) } Vase Vase [Playmaker Tutorials]- [Materials]-[Color_Sheet] D&D } Project View [Playmaker Tutorials]-[Objects]- [Vase_Broken] Hierarchy D&D Position ( 0, 0, 0 ) } Vase_Broke Vase_Broken [Playmaker Tutorials]-[Materials]-[Color_Sheet] D&D 2016/1Copyright(C) 2016 . All Rights Reserved 102
  103. 103. } GameObject TriggerVase } TriggerVase Box Collider } Box Collider IsTrigger } TriggerVase Position(0 , 0.5, 0) Scale ( 1, 1, 1 ) 2016/1Copyright(C) 2016 . All Rights Reserved 103
  104. 104. } TriggerVase PlayMaker Editor } ◦ Unbroken(Start ) ◦ Exploding ◦ Broken 2016/1Copyright(C) 2016 . All Rights Reserved 104
  105. 105. } break } Unbroken [ ]-[break] } Exploding [ ]-[FINISHED } Broken } Unbroken(break)=>Exploding(FINISHED)=>Broken } Unbroken Trigger Event Send Event break 2016/1Copyright(C) 2016 . All Rights Reserved 105
  106. 106. } 2016/1Copyright(C) 2016 . All Rights Reserved 106
  107. 107. } FSM Unbroken (break) => Exploding (FINISHED) => Broken 2016/1Copyright(C) 2016 . All Rights Reserved 107
  108. 108. } 2016/1Copyright(C) 2016 . All Rights Reserved 108 FINISHED break Unbroken Exploding FINISHED Broken
  109. 109. } / ◦ Set Visibility(Mesh Renderer / ) ◦ Activate Game Object(GameObject / ) ◦ Destory Component( ) ◦ Destroy Object( GameObject ) ◦ Destroy Self( GamObject ) } Set Visibility } Setup( ) ◦ Visible : ◦ Visible : } Explosding ◦ Visible : ◦ Visible : 2016/1Copyright(C) 2016 . All Rights Reserved 109
  110. 110. } TriggerVase PlayMaker Editor } Setup } Setup } Setup [ ]- [FINISHED] } Setup FINISHED Unbroken } 2016/1Copyright(C) 2016 . All Rights Reserved 110
  111. 111. } 2016/1Copyright(C) 2016 . All Rights Reserved 111
  112. 112. } Setup Set Visibility } (Vase Vase) Visible } (Vase_Broken Vase_Broken) Visible } Set Visibility Reset On Exit 2016/1Copyright(C) 2016 . All Rights Reserved 112
  113. 113. } ◦ ◦ } ◦ ◦ Setup 2016/1Copyright(C) 2016 . All Rights Reserved 113
  114. 114. } } ◦ [Playmaker Tutorials]-[Prefabs]-[breakPuff] } (breakPuff } GameObject Create Object } Exploding Create Object 2016/1Copyright(C) 2016 . All Rights Reserved 114
  115. 115. } Game Object Project View [Playmaker Tutorials]-[Prefabs]-[breakPuff] D&D } (SpawnPoint Position) SpawnPoint GameObject } OK 2016/1Copyright(C) 2016 . All Rights Reserved 115
  116. 116. } GameObject } GameObject VasePrefab } VasePrefab Vase Vase_Broken TriggerVase 2016/1Copyright(C) 2016 . All Rights Reserved 116
  117. 117. } VasePrefab Project View Example/Chapter05 D&D } } VasePrefab } Hierarchy View VasePrefab } Project View !!! 2016/1Copyright(C) 2016 . All Rights Reserved 117
  118. 118. } Project View [Playmaker Tutorials]- [Objects]-[Coin] Hierarchy D&D } Position (0, 0, 0) ( ) } Coin Coin [Playmaker Tutorials]- [Materials]-[Color_Sheet] D&D 2016/1Copyright(C) 2016 . All Rights Reserved 118
  119. 119. } Coin Coin PlayMaker Editor } Rotate } Rotate Rotate } 2016/1Copyright(C) 2016 . All Rights Reserved 119
  120. 120. } GameObject TriggerCoin } Position (0, 0.75, 0) Scale (0.5, 0.5, 0.5) } TriggerCoin Box Collider } Box Collider Is Trigger 2016/1Copyright(C) 2016 . All Rights Reserved 120
  121. 121. } TriggerCoin Coin } TriggerCoin PlayMaker Editor ◦ Uncollected( ) ◦ Collected } Picked Up Uncollected Picked Up Collected 2016/1Copyright(C) 2016 . All Rights Reserved 121
  122. 122. } Uncollected Trigger Event Send Event Picked Up } Collected Destroy Self } TriggerCoin } 2016/1Copyright(C) 2016 . All Rights Reserved 122
  123. 123. } Get Parent GameObject } parent GameObject } Collected Get Parent Store Result parent } 2016/1Copyright(C) 2016 . All Rights Reserved 123
  124. 124. } Collected 2016/1Copyright(C) 2016 . All Rights Reserved 124 1 2
  125. 125. } PlayMaker } Destroy Self ( ) } D&D ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 125
  126. 126. } 1. 2. ( ) } Get Parent Destroy Self Destroy GameObject 2016/1Copyright(C) 2016 . All Rights Reserved 126
  127. 127. } 2016/1Copyright(C) 2016 . All Rights Reserved 127
  128. 128. } PlayMaker 2016/1Copyright(C) 2016 . All Rights Reserved 128
  129. 129. } Get Parent parent 2016/1Copyright(C) 2016 . All Rights Reserved 129
  130. 130. } Coin } Hierarchy Coin } Project View !!! 2016/1Copyright(C) 2016 . All Rights Reserved 130
  131. 131. } } Scene View Hierarchy View } PlayMaker GameObject ( ) Scene View Hierarchy View Project View 2016/1Copyright(C) 2016 . All Rights Reserved 131
  132. 132. } PlayMaker Editor 2016/1Copyright(C) 2016 . All Rights Reserved 132
  133. 133. } Project View VasePrefab TriggerVase PlayMaker Editor } Exploding Create Object } Game Object Project View Coin D&D } Spawn Point Setup 2016/1Copyright(C) 2016 . All Rights Reserved 133
  134. 134. } GameObject CoinSpawnPoint } Setup Get Parent } Store Result CoinSpawnPoint } Exploding Create Object Spawn Point CoinSpawnPoint } VasePrefab Hierarchy View D&D 2016/1Copyright(C) 2016 . All Rights Reserved 134
  135. 135. } ◦ Create Object } ◦ Destroy Object ◦ Destroy Self ◦ } 2016/1Copyright(C) 2016 . All Rights Reserved 135
  136. 136. 2016/1Copyright(C) 2016 . All Rights Reserved 136
  137. 137. 2016/1Copyright(C) 2016 . All Rights Reserved 137
  138. 138. } => => ... 2016/1Copyright(C) 2016 . All Rights Reserved 138
  139. 139. } [Ctrl + N](Cmd + N) } [Ctrl + S] (Cmd + S) ( Example/Chapter06/Scene06 ) } ThridPersonController Position( 0, 0, -3) } Plane Position( 0 , 0, 0 ) 2016/1Copyright(C) 2016 . All Rights Reserved 139
  140. 140. } Cube Position(0, 0.5, 0) } Project View Material CubeMat Albedo } GameObject Trigger Color Position(0, 1,5, 0) Scale(3,3,3) } Trigger Color Box Collider IsTrigger 2016/1Copyright(C) 2016 . All Rights Reserved 140
  141. 141. } Trigger Color PlayMaker Editor ◦ Setup( ) ◦ Listener ◦ Change Color ◦ Blue ◦ Red } ◦ change color ◦ color blue ◦ color red 2016/1Copyright(C) 2016 . All Rights Reserved 141
  142. 142. } ◦ color index ◦ int } 2016/1Copyright(C) 2016 . All Rights Reserved 142
  143. 143. } Listener ◦ Trigger Event ◦ Send Event: change color } Change Color ◦ Int Switch – Int Variable: color index – Int Switches 2 ( ) – 1 – Compare Int: 0 – Send Event: color blue – 2 – Compare Int: 1 – Send Event: color red 2016/1Copyright(C) 2016 . All Rights Reserved 143
  144. 144. } Blue ◦ Set Material Color – Game Object: Specify game Object Cube – Material: CubeMat ( Cube ) – Color: ◦ Set Int Value – Int Variable: color index – Int Value: 1 2016/1Copyright(C) 2016 . All Rights Reserved 144
  145. 145. } Red ◦ Set Material Color – Game Object: Specify game Object Cube – Material: CubeMat ( Cube ) – Color: ◦ Set Int Value – Int Variable: color index – Int Value: 0 2016/1Copyright(C) 2016 . All Rights Reserved 145
  146. 146. } Play Cube } } 2016/1Copyright(C) 2016 . All Rights Reserved 146
  147. 147. } Int Switch Int ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 147 color int ? Cube color int 1 Cube color int 0 0 1
  148. 148. } Logic Int Switch } } } Logic URL ◦ https://hutonggames.fogbugz.com/default.asp?W456 2016/1Copyright(C) 2016 . All Rights Reserved 148
  149. 149. } } Albedo 2016/1Copyright(C) 2016 . All Rights Reserved 149
  150. 150. } Int ( ) } color index 0 1 } Math Math In ( ) float ( ) bool ( ) } } 2016/1Copyright(C) 2016 . All Rights Reserved 150
  151. 151. } Material } Int Switch Logic } Int ( ) float ( ) Bool ( ) Math 2016/1Copyright(C) 2016 . All Rights Reserved 151
  152. 152. 2016/1Copyright(C) 2016 . All Rights Reserved 152
  153. 153. Logic 2016/1Copyright(C) 2016 . All Rights Reserved 153
  154. 154. } 0 Game Over 2016/1Copyright(C) 2016 . All Rights Reserved 154
  155. 155. } [Ctrl + N](Cmd + N) } [Ctrl + S] (Cmd + S) ( Example/Chapter05/Scene05 ) } ThridPersonController Position( 0, 0, -3) } Plane Position( 0 , 0, 0 ) 2016/1Copyright(C) 2016 . All Rights Reserved 155
  156. 156. } [Playmaker Tutorials]-[Objects]-[Health_Cross] Hierarchy D&D Position(0,0,0) } Health_Cross Health_Cross PlayMaker Editor Rotate } Rotate Rotate Y 360 / 2016/1Copyright(C) 2016 . All Rights Reserved 156
  157. 157. } GameObject TriggerHealth Position(0, 0, 0) Scale( 0.75, 0.75, 0.75) } TriggerHealth Box Collider Is Trigger } TriggerHealth Health_Cross } Health_Cross Position (0, 1, 0) Hierarchy Health_CrossPrefab 2016/1Copyright(C) 2016 . All Rights Reserved 157
  158. 158. } Cube } Cube Damage Position(0, 0, 0) Scale( 1, 0.1, 1 ) } Material DamageMat } GameObject TriggerDamage Position(0, 0, 0) Scale(1, 3, 1) } Box Collider IsTrigger } GameObject DamageBox Position(0,0,0) Damage TriggerDamage 2016/1Copyright(C) 2016 . All Rights Reserved 158
  159. 159. } uGUI } uGUI Unity UI Unity4.6 } OnGUI UI 2D 3D UI } PlayMaker uGUI Add-On ◦ https://hutonggames.fogbugz.com/default.asp?W1192 } uGuiProxy.unitypackage 2016/1Copyright(C) 2016 . All Rights Reserved 159
  160. 160. } uGUI PlayMaker [PlayMaker uGui] -[Prefabs]-[Playmaker UGui] } Text Hierarchy View [Create]- [UI]-[Text] } Canvas EventSystem 2016/1Copyright(C) 2016 . All Rights Reserved 160
  161. 161. } Canvas Canvas Scale UI 2016/1Copyright(C) 2016 . All Rights Reserved 161
  162. 162. } Game View Free Aspect 16:9 2016/1Copyright(C) 2016 . All Rights Reserved 162
  163. 163. } Canvas/Text UI Game View 2016/1Copyright(C) 2016 . All Rights Reserved 163
  164. 164. } Text ) 2016/1Copyright(C) 2016 . All Rights Reserved 164
  165. 165. } Text 2016/1Copyright(C) 2016 . All Rights Reserved 165
  166. 166. } Game Object } GameObject HealthManager Position } HealthManager PlayMaker Editor Setup } (int ) ◦ Player_health ◦ : int } Text UpdateHUD 2016/1Copyright(C) 2016 . All Rights Reserved 166
  167. 167. } Setup ◦ Set Int Value – Int Variable: Player_health – Int Value: 100 ◦ FINISHED UpdateHUD 2016/1Copyright(C) 2016 . All Rights Reserved 167
  168. 168. } UpdateHUD ◦ uGUITextSetText.unitypackage uGUI Text ◦ Text ( ) Convert Int To Stirng ( player_health_string ) ◦ 2016/1Copyright(C) 2016 . All Rights Reserved 168
  169. 169. } 2016/1Copyright(C) 2016 . All Rights Reserved 169
  170. 170. } 100 2016/1Copyright(C) 2016 . All Rights Reserved 170
  171. 171. } ( ) (Damage) (HealthManager player_health) } } 2016/1Copyright(C) 2016 . All Rights Reserved 171
  172. 172. } [ ] 2016/1Copyright(C) 2016 . All Rights Reserved 172
  173. 173. } } CurrentPlayerHealth(Int HealthManager(GameObject ) } 2016/1Copyright(C) 2016 . All Rights Reserved 173
  174. 174. } Setup ◦ Get Owner – Store Game Object Globals/HealthManager ◦ Set Int Value – player_health Globals/CurrentPlayerHealth – 2016/1Copyright(C) 2016 . All Rights Reserved 174
  175. 175. } UpdateHUD ◦ Convert Int To String – Int Variable player_health Globals/CurrentPlayerHealth – String Valiable: ( ) ◦ U Gui Text Set Text – } 2016/1Copyright(C) 2016 . All Rights Reserved 175
  176. 176. } HealthManager ◦ Listener ( ) ◦ Add Health ◦ Remove Health } ◦ add_health ◦ remove_health ◦ ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 176
  177. 177. } 2016/1Copyright(C) 2016 . All Rights Reserved 177
  178. 178. } 2016/1Copyright(C) 2016 . All Rights Reserved 178
  179. 179. } Add Health ◦ Int Add – Int Variable: Globals/CurrentPlayerHealth – Add: 25 } Remove Health ◦ Int Operator (Int Add ) ◦ Integer 1: Globals/CurrentPlayerHealth ◦ Integer 2: 10 ◦ Operation: Subtract ◦ Store Result: Globals/CurrentPlayerHealth 2016/1Copyright(C) 2016 . All Rights Reserved 179
  180. 180. } Project View Health_CrossPrefab TriggerHealth PlayMaker Editor 2016/1Copyright(C) 2016 . All Rights Reserved 180
  181. 181. } ◦ Listener( ) ◦ Update Health } ◦ update_health } 2016/1Copyright(C) 2016 . All Rights Reserved 181
  182. 182. } ◦ parent GameObject } Listener ◦ Trigger Event – Send Event : update_health 2016/1Copyright(C) 2016 . All Rights Reserved 182
  183. 183. } Update Health ◦ Send Event – ◦ Get Parent – Store Result: parent ◦ Destroy Object – Game Object : parent 2016/1Copyright(C) 2016 . All Rights Reserved 183
  184. 184. } Send Event 2016/1Copyright(C) 2016 . All Rights Reserved 184
  185. 185. } / 2016/1Copyright(C) 2016 . All Rights Reserved 185
  186. 186. } Health_CrossPrefab } 25 } ◦ DamageBox DamageBox 2016/1Copyright(C) 2016 . All Rights Reserved 186
  187. 187. } 100 } 150 } 0 (0 ) GAME OVER 2016/1Copyright(C) 2016 . All Rights Reserved 187
  188. 188. } Listener add_health Add Health } Listener 2016/1Copyright(C) 2016 . All Rights Reserved 188
  189. 189. } HealthManager PlayMaker Editor } ◦ Check Health } Check Health ◦ int Compare } ◦ add_health ◦ FINISHED } 2016/1Copyright(C) 2016 . All Rights Reserved 189 Check Health
  190. 190. } Check Health 2016/1Copyright(C) 2016 . All Rights Reserved 190
  191. 191. } Int Compare 2016/1Copyright(C) 2016 . All Rights Reserved 191
  192. 192. } ◦ Equal: ◦ Less Than: Integer 1 < Integer 2 ◦ Grater Than: Integer 1 > Integer 2 } CurrentPlayerHealth 150 add_heath FINISHED 2016/1Copyright(C) 2016 . All Rights Reserved 192
  193. 193. } Health_CrossPrefab } 25 150 2016/1Copyright(C) 2016 . All Rights Reserved 193
  194. 194. } DamageBox 150 150 } 2016/1Copyright(C) 2016 . All Rights Reserved 194
  195. 195. } ◦ Add Health – Int Compare ◦ Round Health – Set Int Value 150 ◦ round_health 2016/1Copyright(C) 2016 . All Rights Reserved 195
  196. 196. } 0 GAME OVER } 2016/1Copyright(C) 2016 . All Rights Reserved 196
  197. 197. } ◦ Is Dead ? – Int Compare ◦ Game Over ◦ U Gui Text Set Text uGUI Text GAME OVER ◦ game_over 2016/1Copyright(C) 2016 . All Rights Reserved 197
  198. 198. 2016/1Copyright(C) 2016 . All Rights Reserved 198
  199. 199. 2016/1Copyright(C) 2016 . All Rights Reserved 199
  200. 200. } 2010 – https://www.assetstore.unity3d.com/jp/#!/content/84 2016/1Copyright(C) 2016 . All Rights Reserved 200
  201. 201. } iTween – http://itween.pixelplacement.com/examples.php 2016/1Copyright(C) 2016 . All Rights Reserved 201
  202. 202. } PlayMaker iTween } } iTween Easy( ) 2016/1Copyright(C) 2016 . All Rights Reserved 202
  203. 203. } 2016/1Copyright(C) 2016 . All Rights Reserved 203 I Tween Look From
  204. 204. Look Move Punch ( ) Rotate Scale Shake ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 204 Pause Resume Stop ( )
  205. 205. From ( ) To ( ) By ( ) Add By Update (EasType To ) 2016/1Copyright(C) 2016 . All Rights Reserved 205
  206. 206. 2016/1Copyright(C) 2016 . All Rights Reserved 206
  207. 207. } iTween } EasyType 2016/1Copyright(C) 2016 . All Rights Reserved 207
  208. 208. 2016/1Copyright(C) 2016 . All Rights Reserved 208
  209. 209. Tag 2016/1Copyright(C) 2016 . All Rights Reserved 209
  210. 210. } Cube } Cube iTween 2016/1Copyright(C) 2016 . All Rights Reserved 210
  211. 211. } } Plane Position(0, 0, 0) } Cube PopCube Position(0, 0.5. 0) } PopCube [Playmaker Tutorials]-[Materials]- [Cube_Blue] 2016/1Copyright(C) 2016 . All Rights Reserved 211
  212. 212. } PopCube PlayMaker Editor } ◦ Listener ◦ Pop Up } ◦ pop_up ( ) } ◦ wait_time (float ) 2016/1Copyright(C) 2016 . All Rights Reserved 212
  213. 213. } } pop_up Pop Up 2016/1Copyright(C) 2016 . All Rights Reserved 213
  214. 214. } PopCube RigidBody } PopCube RigidBody } Physic Material Bouncy Bouncy Bounciness 1 PopCube Box Collider Material 2016/1Copyright(C) 2016 . All Rights Reserved 214
  215. 215. } 2016/1Copyright(C) 2016 . All Rights Reserved 215
  216. 216. } Add Force } 2016/1Copyright(C) 2016 . All Rights Reserved 216
  217. 217. Game Object Game Object At Position Vector X, Y, Z Space (World) (Self) Force Mode ( ) Every Frame ? 2016/1Copyright(C) 2016 . All Rights Reserved 217 FoceMode Force Impulse VelocityChange Acceleration
  218. 218. } Listener Pop Up (PopCube ) } Listener 2016/1Copyright(C) 2016 . All Rights Reserved 218
  219. 219. } } Add Torque iTweenRotateAdd } 2016/1Copyright(C) 2016 . All Rights Reserved 219
  220. 220. } PopCube } Inspector View } Add Tag... 2016/1Copyright(C) 2016 . All Rights Reserved 220
  221. 221. } Tags } Tag 0 PopCube 2016/1Copyright(C) 2016 . All Rights Reserved 221
  222. 222. } PopCube Tag (PopCube) 2016/1Copyright(C) 2016 . All Rights Reserved 222
  223. 223. } PopCube (3x3=9 ) } PopCube pop_up PopCube 2016/1Copyright(C) 2016 . All Rights Reserved 223
  224. 224. } PopCube PopManager } PopManager } PopManager PlayMaker Editor } ◦ Setup ◦ Send Pop Up 2016/1Copyright(C) 2016 . All Rights Reserved 224
  225. 225. } ◦ time_to_wait (float ) ◦ target_object (GameObject ) } 2016/1Copyright(C) 2016 . All Rights Reserved 225
  226. 226. } Setup ◦ Random Float – Min: 0.5 – Max: 2.0 – Store Result: time_to_wait ◦ Wait – Time: time_to_wait – Finish Event: FINISHED 2016/1Copyright(C) 2016 . All Rights Reserved 226
  227. 227. } Send Pop Up ◦ Get Random Object – With Tag: PopCube – Store Result: target_object ◦ Send Event – Game Object – GameObject Specify Game Objet: terget_object – Send Event: pop_up 2016/1Copyright(C) 2016 . All Rights Reserved 227
  228. 228. } Rigidbody } Tag ◦ Get Random Object( ) ◦ Find Game Object(1 ) } Tag ◦ Get Tag ◦ Game Object Tag Switch 2016/1Copyright(C) 2016 . All Rights Reserved 228
  229. 229. 2016/1Copyright(C) 2016 . All Rights Reserved 229
  230. 230. } Scene10 } ( ) } [Playmaker Tutorials]-[Scenes]-[10 - Platform Puzzle Chest Opening Game] 2016/1Copyright(C) 2016 . All Rights Reserved 230
  231. 231. 2016/1Copyright(C) 2016 . All Rights Reserved 231
  232. 232. } M2H C# Game Examples ◦ https://www.assetstore.unity3d.com/jp/#!/content/116 } PlayMaker ◦ https://hutonggames.fogbugz.com/default.asp?W880 } } 2016/1Copyright(C) 2016 . All Rights Reserved 232
  233. 233. 1. PlayMaker 2. M2H C# Game Examples 3. MeshCombineUtility.cs l combine.mesh.GetTriangleStrip combine.mesh.GetTriangles l combine.mesh.SetTriangleStrip combine.mesh.SetTriangles 2016/1Copyright(C) 2016 . All Rights Reserved 233
  234. 234. } M2HGamesPlayMaker.unitypackage } } } PlayMakerM2H.zip 2016/1Copyright(C) 2016 . All Rights Reserved 234
  235. 235. 2016/1Copyright(C) 2016 . All Rights Reserved 235
  236. 236. } } PlayMaker C# ◦ C# – ( : void) – 0 1 ◦ PlayMaker – Send Message 2016/1Copyright(C) 2016 . All Rights Reserved 236
  237. 237. } C# PlayMaker ◦ PlayMaker – ◦ C# – ( ) 2016/1Copyright(C) 2016 . All Rights Reserved 237 ; .; ; ; ; :" ; C B ) ; B E ) ( ) ( ) B ; E ( )"( :" B ; F F
  238. 238. 2016/1Copyright(C) 2016 . All Rights Reserved 238
  239. 239. 2016/1Copyright(C) 2016 . All Rights Reserved 239
  240. 240. } PlayMaker Unity } } 2016/1Copyright(C) 2016 . All Rights Reserved 240
  241. 241. } Add-On ◦ https://hutonggames.fogbugz.com/default.asp?W714 } Ecosystem Browser Unity Editor ◦ https://hutonggames.fogbugz.com/default.asp?W1181 } Ecosystem.unitypackage 2016/1Copyright(C) 2016 . All Rights Reserved 241
  242. 242. } PlayMaker & } Ecosystem } Unity [PlayMaker]-[Addons]-[Ecosystem]- [Ecosystem Browser] (ALT+E ) } ugui mecanim github } Get 2016/1Copyright(C) 2016 . All Rights Reserved 242

×