[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-games-devel
Subject: Re: [Kde-games-devel] kspaceduel: porting to Graphics View
From: Dirk <dirkrathlev () gmx ! de>
Date: 2006-12-28 23:05:22
Message-ID: 45944DB2.3080201 () gmx ! de
[Download RAW message or body]
Dmitry Suzdalev wrote:
> There's a third possibility:
>
> You can use qgraphicsitem_cast instead of static_cast.
> It should be faster, but you need to prepare you QGraphicsItem-inherited class
> for its use.
>
> See http://doc.trolltech.com/4.2/qgraphicsitem.html#qgraphicsitem_cast for
> information on how to do that :-).
>
>
Hmm, BulletSprite already has a type() function. It returns S_BULLET and
is used in collision detection. As S_BULLET is unique, I think I don't
have to change anything. But is this good style, using type() for
gameplay issues?
At least it works.
Regards,
Dirk
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic