Beispiel #1
0
    void DispatchBonus(Enemy enemy)
    {
        GObject entity = MainLogic.GetMainLogic().GetEntityManager().GetEntity(GObject.ObjectType.Bonus);

        if (entity != null)
        {
            entity.m_Transform.SetParent(m_TrsLevelObjects);
            entity.m_Transform.position = enemy.m_Transform.position;

            Bonus bonus = entity as Bonus;
            bonus.SetBonus(enemy.GetBonus());
            bonus.AddFloorTouchListener(BonusTouchFloor);
            bonus.AddPlatformTouchListener(BonusTouchPlatform);
            m_AllFlyingBonuses.Add(bonus);
        }
    }