コード例 #1
0
ファイル: HeroScript.cs プロジェクト: AxeLFFF/AlcoHero
 void OnCollisionEnter2D(Collision2D c)
 {
     if (c.gameObject.name == "land")
     {
         jumpCount      = 0;
         grounded       = true;
         isJumpingState = false;
     }
     if (c.gameObject.tag == "alcohol")
     {
         factoryScr.CreateAlcohol();
         alcoholDegree += GetAlcoholEffect(c.gameObject);
         gameStateScr.SetGameSpeedByAlcohol(alcoholDegree);
         Destroy(c.gameObject);
     }
 }