示例#1
0
    public void AddToLife(int inlife, Transform inTransform)
    {
        int oldlife = curLife;

        //препятствие и водка
        if (inlife < 0 && playerScript.isVodka())
        {
            return;
        }
        curLife += inlife;
        if (curLife <= 0 && oldlife > 0)
        {
            GameOver();
            string DeadEvent;
            if (inTransform)
            {
                DeadEvent = "Dead ";
                while (inTransform)
                {
                    DeadEvent  += "\\" + inTransform.name;
                    inTransform = inTransform.parent;
                }
            }
            else
            {
                DeadEvent = "Dead";
            }
            FlurryPlugin.FlurryLogEvent(DeadEvent);
        }
        curLife = curLife < 0?0:curLife;
        curLife = curLife > MaxLife?MaxLife:curLife;
    }
示例#2
0
 override protected void MakeOnTouch()
 {
     if (screenToShow == "ScreenShop" || screenToShow == "ScreenSettings" || screenToShow == "ScreenMap" || screenToShow == "ScreenKniga")
     {
         FlurryPlugin.FlurryLogEvent(screenToShow);
     }
     screenLoader.LoadScreenByName(screenToShow);
 }