ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2021ǯ09·î19Æü(Æü) 16:03:49ÍúÎò
¡¡´û¸¤Î¥¨¥Õ¥§¥¯¥ÈÍѤΥ²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤â¤è¤¤¤Ç¤¹¤·¡¢¼«ºî¤·¤¿¥¨¥Õ¥§¥¯¥È¤Ç¤â¹½¤¤¤Þ¤»¤ó¡£
¡¡²èÁü¤Ç¥¨¥Õ¥§¥¯¥È¤òºîÀ®¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢¥Ò¥¨¥é¥ë¥¡¼¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢
2D Object => Sprites => Square ¤òÁªÂò¤·¤Þ¤¹¡£²èÁü¤ÎÀßÄê¤Î¤Ê¤¤£²£Ä¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£
¤³¤Î¥¿¥¤¥×¤Î¥¨¥Õ¥§¥¯¥È¤Ï¡¢£±Ëç¤Î²èÁü¤ò¥¹¥¯¥ê¥×¥È¤«¤é¥¢¥Ë¥á¡¼¥·¥ç¥ó¤µ¤»¤ë(DOTween ¤ÇÆ°¤«¤¹)¤³¤È¤Ç¥¨¥Õ¥§¥¯¥È¤È¤·¤Þ¤¹¡£
¼ÂÁõÆ°²è
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î̾¾Î¤Ï¡¢¥³¥ó¥Ç¥£¥·¥ç¥ó¤Î̾¾Î¤òÍøÍѤ·¡¢Effect_<ConditionType> ¤È¤·¤Æ¤ª¤¯¤ÈȽÊ̤·¤ä¤¹¤¯¤Ê¤ê¤Þ¤¹¡£
¡¡¤³¤ÎÎã¤Ç¤Ï Sleep ÍѤΥ³¥ó¥Ç¥£¥·¥ç¥ó¤Î¥¨¥Õ¥§¥¯¥È¤òºîÀ®¤·¤Æ¤¤¤ë¤Î¤Ç¡¢Ì¾¾Î¤Ï Effect_Sleep ¤È¤·¤Æ¤¤¤Þ¤¹¡£
¡¡
¡¡¥¨¥Õ¥§¥¯¥È¤Ë»ÈÍѤ¹¤ë²èÁü¤ò Unity ¤Ø¥¤¥ó¥Ý¡¼¥È¤·¡¢TextureType ¤ò Sprite(2D & UI)¤ËÀßÄꤷ¤Þ¤¹¡£
º£²ó¤Ï̵ÎÁ¤Î²èÁü¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£
¡¡ºÇ¸å¤Ë ConditionEffect ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Æ¡¢ConditionType ¤ò Sleep ¤ËÀßÄꤷ¤Þ¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
Scene¥Ó¥å¡¼²èÁü
¡¡
¡¡°Ê¾å¤Ç´°À®¤Ç¤¹¡£
ÌäÂ꤬¤Ê¤±¤ì¤Ð¥×¥ì¥Õ¥¡¥Ö¤Ë¤·¤Æ¡¢¥Ò¥¨¥é¥ë¥¡¼¤«¤éºï½ü¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡¥¨¥Õ¥§¥¯¥È¤Ë¥Ñ¡¼¥Æ¥£¥¯¥ë¤ò»È¤¦¾ì¹ç¡¢£±Ëç¤Î²èÁü¤òÍøÍѤ·¤ÆºîÀ®¤¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£
¤³¤Î¾ì¹ç¡¢Î³»Ò¤È¤·¤ÆÊü½Ð¤µ¤ì¤ëÉôʬ¤Ë£±Ëç¤Î²èÁü¤Î¾ðÊó¤¬ÍøÍѤµ¤ì¤Þ¤¹¡£
¡¡£±Ëç¤Î²èÁü¤½¤Î¤â¤Î¤Ï¥Ñ¡¼¥Æ¥£¥¯¥ë¤ËľÀÜÅÐÏ¿¤Ç¤¤Ê¤¤¤¿¤á¡¢¥Þ¥Æ¥ê¥¢¥ë¤òºîÀ®¤·¤Æ¡¢¤½¤Á¤é¤Ë²èÁü¤òÅÐÏ¿¤·¡¢
¤½¤Î¥Þ¥Æ¥ê¥¢¥ë¤ò¥Ñ¡¼¥Æ¥£¥¯¥ë¤È¤·¤ÆÊü½Ð¤¹¤ë¤è¤¦¤Ë¤¹¤ë¤³¤È¤Ç¼ÂÁõ½ÐÍè¤Þ¤¹¡£
¤Ê¤ª¡¢Ê£¿ô¤Î²èÁü¤¬¤¢¤Ã¤Æ¡¢¤½¤ì¤ò£±Ëç¤ÎÆ°²è¤È¤·¤Æ¥¹¥×¥é¥¤¥È¥¢¥Ë¥á¡¼¥·¥ç¥ó¤µ¤»¤ë¾ì¹ç¤Ë¤Ï¡¢Ê̤μêË¡¤¬¤¢¤ê¤Þ¤¹¡£
¡ã¼ÂÁõÆ°²è¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡ºÇ½é¤Ë¥¨¥Õ¥§¥¯¥È¤Ë»ÈÍѤ¹¤ë²èÁü¤ò Unity ¤Ë¥¤¥ó¥Ý¡¼¥È¤·¤Þ¤¹¡£º£²ó¤Ï̵ÎÁ¤Î²èÁü¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£
TextureType ¤Ë¤Ï Sprite(2D & UI) ¤òÀßÄꤷ¤Þ¤¹¡£
²èÁü¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼
¡¡¼¡¤Ë¥Þ¥Æ¥ê¥¢¥ë¤ò¿·µ¬ºîÀ®¤·¡¢¤³¤Á¤é¤Î²èÁü¤òÀßÄꤷ¤Þ¤¹¡£
¡¡¥Þ¥Æ¥ê¥¢¥ëÍѤΥե©¥ë¥À¤òÍÑ°Õ¤·¡¢¤½¤ÎÃæ¤Ç Create => Material ¤òÁªÂò¤·¤Þ¤¹¡£
¿·¤·¤¤¥Þ¥Æ¥ê¥¢¥ë¤¬ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾¾Î¤Ï¥³¥ó¥Ç¥£¥·¥ç¥ó¤Î̾¾Î¤¬¤ï¤«¤ë¤è¤¦¤Ë¤·¤Æ¤ª¤¯¤È¤¤¤¤¤Ç¤·¤ç¤¦¡£
¡¡¥Þ¥Æ¥ê¥¢¥ë¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¡¢¾åÃʤˤ¢¤ë Shader ¤ÎÀßÄê¤ò Unlit/Transparent ¤ËÀßÄꤷ¤Þ¤¹¡£
¤³¤ÎÀßÄê¤Ë¤¹¤ë¤³¤È¤Ç£±Ëç¤Î²èÁü¤òÅÐÏ¿¤·¡¢¤½¤Î²èÁü¤Î³ÈÄ¥»Ò¤¬ PNG ¤Ç¤¢¤ì¤Ð¡¢²èÁü¤Î¼þ°Ï¤òÆ©ÌÀ¤Ë¤·¤Æɽ¼¨¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¡¡
¡¡Shader ¤ÎÀßÄê¤Î±¦²¼¤Ë¤¢¤ë Select ¤È½ñ¤¤¤Æ¤¢¤ë¥Ü¥¿¥ó¤ò²¡¤¹¤«¡¢¤³¤ÎÉôʬ¤Ë²èÁü¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤¹¤ë¤³¤È¤Ç¥Þ¥Æ¥ê¥¢¥ë¤Ë²èÁü¤¬ÀßÄꤵ¤ì¤Þ¤¹¡£
¥Þ¥Æ¥ê¥¢¥ë¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡ºÇ¸å¤Ë¥Ñ¡¼¥Æ¥£¥¯¥ë¤ò¿·µ¬ºîÀ®¤·¤Þ¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢Effects => Particle System ¤òÁªÂò¤·¤Þ¤¹¡£
¥Ñ¡¼¥Æ¥£¥¯¥ë¤¬ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾¾Î¤ò Effect_<ConditionType> ¤È¤·¤ÆÊѹ¹¤·¤Þ¤¹¡£
º£²ó¤ÎÎã¤Ç¤Ï Confusion ¤Î¥³¥ó¥Ç¥£¥·¥ç¥ó¤Î¥¨¥Õ¥§¥¯¥È¤òºîÀ®¤·¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢Effect_Confusion ¤ËÊѹ¹¤·¤Æ¤¤¤Þ¤¹¡£
¡¡ConditionEffect ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Æ¡¢ConditionType ¤ò Confusion ¤ËÀßÄꤷ¤Þ¤¹¡£
¡¡Â³¤¤¤Æ¡¢¥Ñ¡¼¥Æ¥£¥¯¥ë¤ÎÆâÍƤòÀßÄꤷ¤Þ¤¹¡£
¡¡¥á¥¤¥óÀßÄê¤ÎÃæ¤Î¤¦¤Á¡¢Looping ¤Ë¥Á¥§¥Ã¥¯¤ò¤¤¤ì¤Æ¡¢¥ë¡¼¥×¤ò¹Ô¤¦¤è¤¦¤ËÀßÄꤷ¤Þ¤¹¡£
MaxParticles ¤Î¿ô¤Ï²èÌÌÆâ¤Ë°ìÅÙ¤Îɽ¼¨¤µ¤ì¤ë¥Ñ¡¼¥Æ¥£¥¯¥ë¤Î¿ô¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢3 ¡Á 5 Á°¸å¤ËÀßÄꤷ¤Þ¤¹¡£
¡¡Shape ¤Î¥â¥¸¥å¡¼¥ë¤ò³«¤¡¢Shape Íó¤ò Box ¤ËÀßÄꤷ¤Þ¤¹¡£
¡¡Renderer ¥â¥¸¥å¡¼¥ë¤ò³«¤¡¢Material Íó¤ËÀè¤Û¤ÉºîÀ®¤·¤¿¥¨¥Õ¥§¥¯¥ÈÍѤΥޥƥꥢ¥ë¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Þ¤¹¡£
Sorting Layer ID ¤ò Chara ¤Ë¤·¡¢Order in Layer ¤ò 1 ¤ËÀßÄꤷ¤Þ¤¹¡£¤³¤ì¤Ç¥×¥ì¥¤¥ä¡¼¤è¤ê¤â¼êÁ°¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¡
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¢
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü£
¡¡°Ê¾å¤Ç¤¹¡£
¥²¡¼¥à²èÌ̤ǥѡ¼¥Æ¥£¥¯¥ë¤ÎºÆÀ¸¤ò¹Ô¤¤¡¢ÀßÄꤷ¤¿²èÁü¤¬¼ÂÁõÆ°²è¤Î¤è¤¦¤Ë¥Ñ¡¼¥Æ¥£¥¯¥ë¤È¤·¤ÆÊü½Ð¤µ¤ì¤ì¤Ð´°À®¤Ç¤¹¡£
¡¡ÌäÂê¤Ê¤±¤ì¤Ð¥×¥ì¥Õ¥¡¥Ö¤Ë¤·¤Æ¡¢¥Ò¥¨¥é¥ë¥¡¼¤«¤é¤Ïºï½ü¤·¤Æ¤ª¤¤Þ¤¹¡£
¡¡¥³¥ó¥Ç¥£¥·¥ç¥ó¤¬ÉÕÍ¿¤µ¤ì¤¿ºÝ¤Î³Æ¥¨¥Õ¥§¥¯¥È¤òÅÐÏ¿¤·¤Æ´ÉÍý¤·¤Æ¤ª¤¯¤¿¤á¤Î¥¯¥é¥¹¤Ç¤¹¡£
¥¨¥Õ¥§¥¯¥È¤¬À¸À®¤µ¤ì¤ë¤³¤È¤Ç¡¢¸½ºß¡¢¤É¤Î¤è¤¦¤Ê¥³¥ó¥Ç¥£¥·¥ç¥ó¤¬ÉÕÍ¿¤µ¤ì¤Æ¤¤¤ë¤«¤ò¥æ¡¼¥¶¡¼¤ËÅÁ¤¨¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¡¡ConditionEffectManager¤Ï¡¢¤¹¤Ù¤Æ¤Î¥³¥ó¥Ç¥£¥·¥ç¥óÍѤΥץì¥Õ¥¡¥Ö¤ò´ÉÍý¤¹¤ë¥Þ¥Í¡¼¥¸¥ã¡¼¥¯¥é¥¹¤Ç¡¢¥·¥ó¥°¥ë¥È¥ó¤Ç¤¹¡£
¤³¤³¤Ë ConditionEffect ¤Î¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¥×¥ì¥Õ¥¡¥Ö¤ò¥¢¥µ¥¤¥ó¤·¤Æ¡¢É¬Íפʥ¯¥é¥¹Æâ¤Ç»²¾È¤·¤ÆÍøÍѤ·¤Þ¤¹¡£
¤¤¤º¤ì¤Î¥¯¥é¥¹¤«¤é¤Ç¤â»²¾È¤·¤ä¤¹¤¤¤è¤¦¤Ë¡¢¥·¥ó¥°¥ë¥È¥ó¤Ç¤ÎºîÀ®¤ò¤·¤Æ¤¤¤Þ¤¹¡£
¡¡¥³¥ó¥Ç¥£¥·¥ç¥ó¤¬¥×¥ì¥¤¥ä¡¼¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¥¿¥¤¥ß¥ó¥°¤Ç¡¢ÀìÍѤΥ¨¥Õ¥§¥¯¥È¤¬¤¢¤ë¾ì¹ç¤Ë¤«¤®¤ê¡¢
ConditionEffectManager ¥¯¥é¥¹¤Ë¥¨¥Õ¥§¥¯¥È¤Î¾ðÊó¤ò¤â¤é¤Ã¤Æ¡¢ÂоݤȤʤ륨¥Õ¥§¥¯¥È¤òÀ¸À®¤¹¤ë¡¢¤È¤¤¤¦½èÍý¤Îή¤ì¤Ç¤¹¡£
¡¡Î㤨¤Ð¡¢¿ç̲¤Î¥³¥ó¥Ç¥£¥·¥ç¥ó¤Ç¤¢¤ì¤Ð¡¢:zzz: ¤ß¤¿¤¤¤Ê¥¨¥Õ¥§¥¯¥È¤òºîÀ®¤·¡¢ ConditionEffectManager ¤Ë¥¢¥µ¥¤¥ó¤·¤Æ¤ª¤¤Þ¤¹¡£
¼ÂºÝ¤Ë¿ç̲¤Î¥³¥ó¥Ç¥£¥·¥ç¥ó¤¬¥×¥ì¥¤¥ä¡¼¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¤é¡¢ConditionEffectManager ¤ò»²¾È¤·¤Æ¡¢:zzz: ¥¨¥Õ¥§¥¯¥È¤òÀ¸À®¤·¤Þ¤¹¡£
¡¡
ConditionEffectManager.cs
¡¡¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤¿¤é¥»¡¼¥Ö¤ò¹Ô¤¤¤Þ¤¹¡£
ConditionEffectManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¡¢ConditionEffectManager ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¤ÆÀßÄê¤ò¹Ô¤¦
¡¡Stage ¥·¡¼¥ó¤Ë¤ª¤¤¤ÆºîÀ®¤·¤Þ¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢Create Empty ¤òÁªÂò¤·¤Þ¤¹¡£
¿·¤·¤¤¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò ConditionEffectManager ¤ËÊѹ¹¤·¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
¡¡Àè¤Û¤ÉºîÀ®¤·¤¿ ConditionEffectManager ¥¹¥¯¥ê¥×¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£
¡¡¥³¥ó¥Ç¥£¥·¥ç¥ó¤Î¥¨¥Õ¥§¥¯¥ÈÍѤΥ²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¢¥µ¥¤¥ó¤¹¤ë¤¿¤á¡¢public ½¤¾þ»Ò¤Ç¤¢¤ë List ÊÑ¿ô¤¬É½¼¨¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢
¤³¤Á¤é¤Ë¥³¥ó¥Ç¥£¥·¥ç¥ó¤Î¥¨¥Õ¥§¥¯¥ÈÍѤΥ²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î³Æ¥×¥ì¥Õ¥¡¥Ö¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£½çÉÔƱ¤Ç¤¹¡£
¤³¤ÎºÝ¡¢List ¤Î·¿¤Ï ConditionEffect ·¿¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë ConditionEffect ¥¯¥é¥¹¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤Ê¤¤¤È¥¢¥µ¥¤¥ó¤Ç¤¤Þ¤»¤ó¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡°Ê¾å¤Ç¥³¥ó¥Ç¥£¥·¥ç¥ó¤òÉÕÍ¿¤µ¤ì¤¿ºÝ¤Î¥¨¥Õ¥§¥¯¥È¤ò±¿ÍѤ¹¤ë¤¿¤á¤Î½àÈ÷¤¬À°¤¤¤Þ¤·¤¿¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯