Tip:
Highlight text to annotate it
X
Hello and welcome to another tutorial from Neo-GameFactory.de
I'm Christoph Winkler and I present to you this time, a new
Unity3D Serie.
Also a new Unity3D Tutorial Serie.
A youtube user has asked me on the last Tutorial from
BurgZergAcrade - The Character Statistics
How to control more than one GameObject with a Single script without
a script on this
several GameObjects.
The Youtube User
want to make a Card Game.
but he has Problems with
or she
the Cards shuffle.
*this is not important for this tutorial xD*
*not important*
*and this is also not important*
Okay, we want to make an Array with Cards in it,
and then
Shuffle the Cards correclty.
So i make this Tutorial for all of us :)
*....i must say more important things....*
In this case I want to make with you
a Poker Game.
I have created a new project in Unity3D
absolutely Blank Project
We will make all things by own Hands ;)
We create a new folder
i named it "Card Games"
in german "Kartenspiele"
in this folder is a folder with the name "Poker"
and in this are two folders with names "Models" and "Scripts"
At first only Poker
later we can make
more Card Games, like "Mau Mau" (German Name of a Card Game)
or
UNO
for example
but now we are by Poker.
We create a new C# Script in
Poker -> Scripts
folder
We named it CardManager.
He Managed our Cards ;)
The go to "GameObject" -> "Create Empty"
Named it
Card_Manager
Drag & Drop the CardManager Script
on Card_Manager GameObject.
Open the
Script to begin.
First we make some Variables. *See Tutorial what kind of Variables*
NumberOfCards = How Many Cards has the Card Game
Poker has 52 Cards!
If we have a other Card Game, then we can
change the Cards in Unity3D Inspector. (Variable is Public)
The next is a Array to save our Cards
as String
Next Variable is
declared in Method "Start"
Start is running one Time. Only when Programm start!
With curNumber we can count up our Cards.
This is important for
read in our Cards
Now we give the Array
the correct size
*numberOfCards = 52* = Array Size
Now we must read in the Cards.
*I telling the List of Cards*
Heart, Caro, and so on....
I make it with a "For loop*
*I don't must translate this, you see it!*
I= 0 and after every loop it do i=i+1 (i++)
First entry of an Array is the Element 0! NOT 1
Working on translate ;)
Paid to them by the square brackets stand for the same percentage
to start with the index not to 1,
but at
therefore
zero
because
match as the Semaine du Obereggen
and now, just as long
as percent
Name of Concerned 52
Kleinert due
No actually to
less
ready to test in the
well-balanced
a
so tall
4 Now we go
Trondheim name board
maybe a tad too very first Kradfahrer
thanks Crowns sample comes as said in the ICS so the DAX note
The first al-brega entry, so to speak Istanbul
this fact
yesterday in autumn
BluO is
Akamai Solatera as
So autumn
than in the past, so to speak
Although I can to St
worried Close the cover
To Dr
Talents into
I is but one percent occurred in the morning
Pauli, TUM
Kate currently the current Carter
greater
Training
Goal 70
less
Flaig
is shown
Masco following namely
Bright Star
the
Stara Bas
Plus the ipc index either words to tell her
to
Townsend index 1
So the entry
two here, so to speak
these also attract more
So now we actually show the office with
as follows for the second pass in the first still quite
addressed not say the second pass that Mother votes
and a gloss, the 4 most
from a pay and held
to
that should not be forgotten
otherwise it could lead to errors later
So the Grad
the current so to speak
this is petty
Set
Pleus
Kauke Neumarkt
€
there have not
dpa
then you are doing here is now percent
and the light-or
that is, if the KTM at the Parc
I keeps it's clarity, the portal starter box is
then it is the
Carol Oates
si
small
Mr. location
Trash on Ernst
Thurn
save then do it by myself
for the ladies that is not or are not carried
what to Audi twelfth card that is at
there Corner
and here
the thirteenth Kate
the King
but now we must also simultaneously
the fact Namborn doing well
Reset to zero
why on
Mueller said he I Dress I
the Work is reset to zero
we
have yes 8
Proposals for the cards look to pressure cn
Catena ® motto closing
Partners Montes Plus've Market value is equal to dry district
Character mba financial statements 1
Front Thousand Oaks
District to say Cotton in Mainz on top and 2 1 out goods from Amanda and Kate
5 1
the means to
wants to buy so
as told
at the end before all caught up 1 bushel or so to speak, at 1
January
or you can read
then we can copy it all here again
and then we do all the stupid ehem
Carrupt
Carraro
Image
again came
€
came in at number three
and the same number
yes Pato
So again everything Pieroth
and then do what is
all to say it all a read maps smooth
Momo everything up again
namely for why one can not but Toko percent
Groeneveld
and
when
search it but that is not everything must avoid all the grinder
packing
while driving
Percent
the
I was always equal to 12
as I said we prefer 13 years of increases Cotton and then he jumps Stewart
Percent for the next
is therefore shopping here and heat
yes but he starts to count at Ambri and therefore only
twelve I mean with you, he needs to consider
there must be a George Lutz - a universe number +1 200 read so that he
appear properly in issue
so therefore if any, up to twelve is to make the
I even fixed the wars
and otherwise
Ezio continue
the Year
is cool
filling
and
small bran I
Now the plus sign that is 25
have
I had a lot from
Since July also mold it is set up so when I return to the
For example, actual automatically
that despite outnumbered us closer
the blog correctly
programmed
converted as if everything had set the
ProLogis com and young people more open
Kara has been with Manuel Jurado way that they
if I do that now it does not work we do not every song
by coach
You must be on the edge rss feed
since me the same on the
if the Year
Gulbis pressure
the 25
threatening
the
Kleinert cared little things so 25 +13 + 13
38
what was there
and now as a last resort
and so
38
and
the
a balance, and the Tigers
Not 51
52
then make Dallas
so you had an agreement Torrance and when the uni-can live properly
has happened
and as
Teyssen
Read similar
is here
Read Caro partners
here it would place cards are read
we will have been the police hotline
"This is now of course again very confusing
that the whole
% Cu and
and that's why I'm here today completely
everything is so insert the Cheonan in a region
a bed, a Member State
this calls
some below
during
and already close U.S. dollar
your everything is still there
but it is a bit easier to have university
please
now in the Abbey function
because with that you make from the function probably not much
how about something vibrates and make a
Shafik Ops function that is then mixed into the maps then
So where Red
create
Kautz
to this is an overloaded function was landed
pass a function has its own version of these functions
you can also make it so
one to
returned to the basics
dgap-news face but as a re-recording the Int
for Roth
and then kill more today
it returns nothing
*** also create we want to pass a variable
and the order was a functionally
which option is passed to five Welser
Most commented in the 'we are to have the girls in braces
around behind the brackets
actually was clear
So to what barrack is
and that is in our struggles
and as I said to a controller via the Xing can make
Now we can also assign a prick any name this time
Stephan Roth
not matter
but we can also
same name Kautz friends
above
The Hague Albahari Archer
is an extra was clear
Alzey clock progresses not tell our Graz Entry from up there
because they can catch here
have quite already declared
under
I'm not even
I speak, it is a new function created with Graz but the ***
Layar so I ple, the function terminate the variant that created the
it is a local variable
when we engage now in this position of Cards
we really have access to this area again not on this
but it is now not so bad because so transferred
the variable
So I'm just saying that a copy
2, we make further
forward
all with a 4 and 2 percent, the mix spot
urgency teach your
EADS may have problems
of course, the clock plays like
it is a new feature that is a kind of
new risk
Krantz point strongly
the means
we read relocate
is
of the above-mentioned
k
Readers of the branches is as large
because I praise him
have assigned names to all 52 to 52 percent moved
is as it were the larger the furniture could also name
Grave stones €
Kautz long
is moved surest way for the GM Opel Plus
offer and there is no further
to hand over money and + +
now lay low Jeanty Churchill expects plans
with a change in the plurality is
over
Trumpet Tune Rensch
were found and that it is minimally go
minimal
to provide fall in the DAX
so far and want to know but it is also to
thank you we make a copy now
So we missing topics
and that of our current on
g
unknown are making suggestions thinks Kamp entered the
temporary
Percent Counsel Inc
the demand
other hand, tries to stop now just stupid
GM is
nevertheless the random number
the Japanese had
that is, for example, occurred in the first run, just let people
you
HM embarrassed to be 10
so far is
The Winning Streak
on the square
Laid waste
Ten percent of the map and thus it provides disappears or
double the straight edges are
Grievances and now digital 1
yes and
is operated by the
go here
WHO consequence increase that is to say, the mix should now this must
nor can Kaufhof-
that I was now receiving the key
the need
No Soest
Steve McClaren domestically
Trunk
is that supposed to
Child was
conversely
Kean Etro Green
Key Account
is therefore not classified pressed inside
intended to
can create the function for Rosie Bernard does not work now so
Amacker
because he wants it for a MW
the us government a Red
passed and that if we project Charouz
Interested me came from Sonderhausen
it forms the subject of an agreement
it is finalized
money and bought the fresh and in solitary confinement
and I already have our functioning
ready for the next one if oral
and see that I have no error
threatening Account Manager
and they have a fall
Cook Uken waste
I could I also treated 150 points Ruiz record the whole community because
Some also see the
so 15 against Thomas Weigel - from the
in Anabel Medina 1
as we see it now starts to count in Madrid
and a
We start times
as seen
January Korte manager
52 cards
But thinking from a 0
then there are 51
per Rinteln exactly and therefore victorious he tells to 52
one makes -
Lutz lay a track 52
- 1
So that means we go
up to
51
top
and therefore also
a star completely
May be warmer and less fussy then at the entry 52
because so far are not
Percent I'm so short that again I
the hot girl - only had
he might come to a club
have random numbers is 52
if the current number in sub-regions
and wildlife of the abas 52
the insert in the current Top Consultant
So maps show the lines & photographers
Axis audience that is not got my card canceled or singer error
or a program kick things we do not want to do
therefore Koblenz - Prince
good looks new again
in Oman look at the partners and see, "It's all so well Hertha 2 3 4 5 6
7 8 9 10 Jack Dennis King Lady Caro Monastery ***
2 3 4 5 6 7 8 9 10 Bube Dame remains king then
2 3 4 5 6 7 8 9 10 well spent because I'm not a second analysis our ads
Andrew Gant
We see a good Torres remained all mixed
and again m
and rapper and also my
and to me you can by going to see that her book is not twice
or was deleted
common start
Rottmann and Charly see are all expensive
Dolls of Zack
I can now simply fun times in Nantes
and then we see
that he has toes and new elements depends on physicians
Assayas
goes high and
ten cards, so to speak 1 to 10
yes, and even press 4 to 11 percent of the elderly is also seen
Judgment is not deleted, and added
suitable to be sung and a
and then Mainz
two dishes at the on the on the object
Lay
and the country in which the display object map the free tool and Hansi
Müller were awarded Inspector
1, and knowledge is power
HK