Ejemplo n.º 1
0
    void CookieEvent(GameObject enemy, float per)
    {
        PlayerStatement EnemyPS   = enemy.GetComponent <PlayerStatement>();
        int             CookieNum = 0;

        CookieNum          = (int)(PS.CookieNum * per);
        EnemyPS.CookieNum += CookieNum;
        GM.AddPlayerCookieNum(enemy.tag, CookieNum);
        PS.CookieNum -= CookieNum;
        GM.AddPlayerCookieNum(tag, -CookieNum);
    }