Adam's Lair Forum

game development and casual madness
It is currently 2020/01/21, 14:34

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: 2015/10/29, 19:18 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
SirePi wrote:
I know, I know.. I'm on it :mrgreen:
Take your time, I'm sure we can answer any doubts in the meantime.

By the way, nice profile picture.


Top
 Profile  
 
PostPosted: 2015/10/30, 06:28 
Member
Member
User avatar

Joined: 2015/10/29, 18:52
Posts: 69
Location: Finland
Role: Hobbyist
Awesome! Thank you.

Got it working with this:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Duality;
using Duality.Components.Physics;

namespace Breakout_Tutorial
{
   public class Ball : Component, ICmpCollisionListener
   {
      public float PaddleImpulse { get; set; }
      
      void ICmpCollisionListener.OnCollisionBegin(Component sender, CollisionEventArgs args)
      {
      }
      void ICmpCollisionListener.OnCollisionEnd(Component sender, CollisionEventArgs args)
      {
      }
      void ICmpCollisionListener.OnCollisionSolve(Component sender, CollisionEventArgs args)
      {
         if( args.CollideWith.Name == "Paddle" )
         {
            this.GameObj.GetComponent<RigidBody>().ApplyLocalImpulse(-Vector2.UnitY * PaddleImpulse);
         }
      }
   }
}


I'm actually starting to like Duality... :rolleyes:

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


Top
 Profile  
 
PostPosted: 2015/10/30, 10:22 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
misthema wrote:
Awesome! Thank you.
--code--
I'm actually starting to like Duality... :rolleyes:
You're quite welcome.
Duality is actually very easy once you get the hang of it.


Top
 Profile  
 
PostPosted: 2015/10/30, 15:30 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
hsnabn wrote:
Take your time, I'm sure we can answer any doubts in the meantime.

Tutorial should be updated "correctly" for Duality 2

hsnabn wrote:
By the way, nice profile picture.

Thanks ^^

misthema wrote:
I'm actually starting to like Duality... :rolleyes:

You had doubts? :mrgreen:

_________________
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

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