Adam's Lair Forum

game development and casual madness
It is currently 2020/01/28, 18:24

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: 2015/01/26, 10:03 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Uhm.. it's a little difficult to diagnose the problem with only that sentence :mrgreen:
Did you already complete all the steps in the tutorial, or are you somewhere in the middle?
Did you try to run the game in debug from Visual Studio and see if the collision code is actually fired?

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2015/01/26, 10:29 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Add a code to the GameManager class that prints the brick's health. Don't forget to set brick count to 1.

Post your result here.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2015/01/26, 10:34 
Novice Member
Novice Member

Joined: 2015/01/12, 03:26
Posts: 22
Role: Hobbyist
Thanks Rock, I manage to fix it by renaming the game object "bricks" to "brick". Cheers! :D


Top
 Profile  
 
PostPosted: 2015/03/04, 22:29 
Newbie
Newbie

Joined: 2015/03/04, 22:20
Posts: 2
Role: Gamer
For some reason i cant get this centered. I'm not sure what i did wrong


Image

Link only cause it wont allow to use [img] cause first post.



Edit by Adam: Inserted the image for you. Sorry for the inconvenience - it's Spambot prevention.


Top
 Profile  
 
PostPosted: 2015/03/04, 22:56 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Hey, welcome to the forums :D

did you by chance set the SpriteRenderer's rect to 10, 10, 20, 20 instead of -10, -10, 20, 20?

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2015/03/05, 01:34 
Newbie
Newbie

Joined: 2015/03/04, 22:20
Posts: 2
Role: Gamer
SirePi wrote:
Hey, welcome to the forums :D

did you by chance set the SpriteRenderer's rect to 10, 10, 20, 20 instead of -10, -10, 20, 20?


Yup! thanks! i just found this engine so i'm just trying to learn it :P I only really know java and not that well.

Thanks Adam!


Top
 Profile  
 
PostPosted: 2015/03/05, 02:09 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
tree wrote:
Thanks Adam!


For a second I thought, you quoted SirePi answering all your questions and then went to thank me for it. Which was kind of weird. Then I realized you were probably talking about my edit to insert the image xD Makes much more sense now.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2015/10/29, 19:03 
Member
Member
User avatar

Joined: 2015/10/29, 18:52
Posts: 69
Location: Finland
Role: Hobbyist
Great to have a simple tutorial like this here! But... I'm not sure what I'm missing (I'm really confused with Duality, been "using" pure coding before this, heh), but it seems that my this.GameObj does not have a property RigidBody...?

Screenshot of my code (using SharpDevelop as my IDE): puu.sh/l26yk/1e826f6b3e.png

Error message it throws:
Quote:
'Duality.GameObject' does not contain a definition for 'RigidBody' and no extension method 'RigidBody' accepting a first argument of type 'Duality.GameObject' could be found (are you missing a using directive or an assembly reference?) (CS1061) - ......\Source\Code\CorePlugin\BallCollider.cs:24,18


Guess I'm missing the using OpenTK;? Well, I tried it, but it doesn't find it - even though it is added in the references: puu.sh/l26GN/81212ce4a9.png

I added it (:OpenTK.dll) from Duality's root folder.

Any ideas?

_________________
.
..
...
....
What?


Top
 Profile  
 
PostPosted: 2015/10/29, 19:08 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
The tutorial is not up to date for Duality 2.0 which was recently released. To fix your problem, you need to do:
Code:
this.GameObj.GetComponent<RigidBody>();
Like that, instead of accessing the property.

During the development of Duality 2.0, the "shortcut properties" except Transform for the GameObject type were removed. You need to use GetComponent to access the component now.

P.S: You can remove OpenTK from your project safely now (and probably should, since Duality 2.0 is portable).

Welcome to the forums!


Top
 Profile  
 
PostPosted: 2015/10/29, 19:12 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
hsnabn wrote:
The tutorial is not up to date for Duality 2.0

I know, I know.. I'm on it :mrgreen:

@misthema: Welcome to the forums! Feel free to ask if there are some obscure points in the tutorial

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group