#so i have to say Bar1=getcomponent<Bar1
1 messages · Page 1 of 1 (latest)
private Foo foo;
if(TryGetComponent(out foo)) // we already specified the type is Foo
if(TryGetComponent(out Foo2 foo2)) // we specify that Foo2 is what we want and store it in foo2 if found```
capilized letters are usually classes / methods
or at least should be
so if (trygetcomponent(out Bar1 bar1))?
gotcha
if (TryGetComponent(out Bar1 bar1) || TryGetComponent(out Bar2 bar2))
force++;
but i never use the bar1 or bar2 variables
then you can put _
instead of a name
if (TryGetComponent(out Bar1 _ ) || TryGetComponent(out Bar2 _ ))
yes
now the paddles rotate when touched, but it finally bounces, thanks!
yay!
lock the paddle rigidbody Z
next time, before doing something like this i'll study a bit through tutorials and stuff
i don't want to spend 2 days making a pong game and, more important, i don't want to bother you for something basic
nah its no bother, just keep practice eventually you get faster/better
and its all the same stuff you're using regardless of game
its not easy especially with english as second language 😛
I understand that believe me
yeah i watched a video and it said that "most of the stuff you are doing is just implementing something you know in a different way"
like a score and money
very true
now you know about reflect
which is very powerful
esp when you start doing bullets or other more complex stuff
i am a b2/c1 in english, but it's still difficult to understand very technical and specific vocabulary that i don't even know in my own language
tyy
now i gtg
i should have started to study 3 hours ago
i have an english literature oral test tomorrow
yes same ! the terminology is confusing at first but just keep googling words eventually it make sense
goodluck !
if i may ask, where are you from?
my fam is actually from close to Naples
cool
can you send me a friend request? i cannot send you one, but if you don't want to is fine
yeah sure np
