I find it funny how you swear in the middle of the video, out of no where to express your point. Hope your channel grows!
@FirstLast-ws7zw8 жыл бұрын
+HappyKiller1O1 Hey what language did you learn before ? i see you moving rocket fast!!!
@HappyKiller1O18 жыл бұрын
energy can neither be created nor destroyed I am very fluent in Java, and need to learn C# for some scripting in Unity. Once you understand Java, the fundamentals of C# become quite basic. :P
@FirstLast-ws7zw8 жыл бұрын
+HappyKiller1O1 Amazing!! I heard that in some forums too once you master java you already know 90% of c# XD! I am going slow as it is one of my first language(First is HTML):(. Good luck with your scripting!
@HappyKiller1O18 жыл бұрын
energy can neither be created nor destroyed If you start having trouble, try messing around with Minecraft modding. You can learn A LOT of Java by doing that, and a lot of useful tricks. Good luck to you too!
@shubhsharma27558 жыл бұрын
Bro HTML was my first language but i may correct you it's not a programming language. It's a markup language. It cant perform logic and other things. My first real programming language is c++ and I find it much easier than c#. If you learn that you already know how all languages work fundamentally.
@TheBellite8 жыл бұрын
Enums, making code not easy to "fuck up". I love this guy, subscribed.
@dgudovic8 жыл бұрын
Your voice is so calming, and your teaching ways have so far been proven to work exceptionaly, at least for me, please continue with this series, it's helping my education a whole lot.
@psis67867 жыл бұрын
dgudovicddd yea so calming 7:34 :)
@ethansantiago70135 жыл бұрын
I think everyone was like "wait, did he just swear?"
@ThatGuyDownInThe4 жыл бұрын
lol
@thatsalot35773 жыл бұрын
I just scrolled the comment section after that.
@7empest_mi3 жыл бұрын
hahaha, exactly
@vanshyadav45336 жыл бұрын
I used to watch your videos 4 years ago in 2013, Just came back, so much nostalgia, it just calms me for some reason
@enemydisabler27079 жыл бұрын
Don't forget to like this video, people have no idea how important support is!
@Brackeys9 жыл бұрын
Enemydisabler Thanks for caring! :D
@magnusm49 жыл бұрын
+Enemydisabler source to your picture please?
@enemydisabler27079 жыл бұрын
magnusm4 I'm really sorry but i can't remember where I got it from.
@magnusm49 жыл бұрын
Enemydisabler dammit -_-
@justmark80408 жыл бұрын
+magnusm4 yt3.ggpht.com/-AmFKgub5RXE/AAAAAAAAAAI/AAAAAAAAAAA/pdBo9u4Jfa4/s48-c-k-no/photo.jpg You just have to click on Inspect Element and you will find it
@crystalsoulslayer7 жыл бұрын
Glad I found these tutorials! There are times when the MSDN site can only explain so much. Thanks for sharing your knowledge.
@jessepaulsen973 Жыл бұрын
"and not 'fuck up' so to say" had me rolling. Just the delivery bro. Great comedic timing.
@jamesinbou9 жыл бұрын
You explained it a lot easier and faster than my professor. Thanks a bunch! Your humor's refreshing as well.
@I.D.M.6 жыл бұрын
This is what I managed to take away from the explanation. Enums are a way write more readable code and a way to code a faster if you're willing to set up an enum. Great video.
@1076888 жыл бұрын
DAMN i chuckled hard at 7:34 hahha
@illegalrepost2135 жыл бұрын
Me too I chuckled so fucking hard
@skuffd-semicolon5 жыл бұрын
@@illegalrepost213 It was so unexpected XD
@mrkewi14 жыл бұрын
@@rswa mee too
@Layarion7 жыл бұрын
i like hearing the clicky of the keyboard.
@龙雨-i6o4 жыл бұрын
I know right
@lampewick3447 жыл бұрын
Upvoted for the swear word
@SubscribersWithNoVideos-cn4nk4 жыл бұрын
Reddit moment
@vylemsobotka36536 жыл бұрын
"I was really busy" (Notice heartstone new on screen )
@sergiorodrigo65047 жыл бұрын
In my opinion it's like an array and some switch I found this program out there I hope you find it useful using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { /* The enum keyword is used to declare an enumeration, a distinct type that consists of a set of named constants called the enumerator list. ... Usually it is best to define an enum directly within a namespace so that all classes in the namespace can access it with equal convenience.*/ public enum Days : int {Monday = 1, Tuesday, Wednesday, Thursday = 90, Friday, Saturday, Sunday}; static void Main(string[] args) { var day = Days.Monday; Console.WriteLine ($"{day}"); Console.WriteLine ($"{(int) day}"); Console.WriteLine ($"{(Days) 3}"); Console.WriteLine ($"{(int) Days.Monday}"); Console.WriteLine ($"{(int) Days.Tuesday}"); Console.WriteLine ($"{(int) Days.Wednesday}"); Console.WriteLine ($"{(int) Days.Thursday}"); Console.WriteLine ($"{(int) Days.Friday}"); Console.WriteLine ($"{(int) Days.Saturday}"); Console.WriteLine ($"{(int) Days.Sunday}"); foreach (var theEnum in Enum.GetValues(typeof(Days))) { Console.WriteLine ($"{(theEnum)}"); } if (day == Days.Monday) { Console.WriteLine ("The conditional was activated"); } } } }
@marhsall-bw5kv9 жыл бұрын
very nice explanation of Enum..I really like how you compared Switch to Enum to show the advantage of Enum over switch..
@zerosandones75473 жыл бұрын
ENUMERATIONS: - a type consisting of a bunch of constants that we associate with a name - the main purpose of enumerations is to replace the numeric values, which we would use, if there were no enumeration types. In this way the code becomes simpler and easier to read. public enum CoffeeSize { Small=100, Normal=150, Double=300 } instead of: const int coffeeSizeSmall = 100; const int coffeeSizeNormal = 150; const int coffeeSizeDouble = 300; - an enumeration is like a class, but we can only declare constants in an enum - the constants of enumerations can be used in switch-case structures public double CalcPrice(CoffeeSize coffeeSize) { switch (coffeeSize) { case CoffeeSize.Small: return 0.20; case CoffeeSize.Normal: return 0.40; case CoffeeSize.Double: return 0.60; default: throw new InvalidOperationException("Unsupported coffee quantity: " + (int)coffeeSize); } } [ As we can see in this example, the possibility for the users of our method to provoke unexpected behavior of the method is negligible, because we force them to use specific values as arguments, namely constants of enumerated CoffeeSize type. This is one of the advantages of constants, which are declared in enumeration types to constants declared in any class. ] - enumerations can take values only from the constants listed in the type - an enumerated variable can have as a value one of the listed in the type constants but cannot have value null - enumerations are a set of constants of type - this listed type (in the example below the type is Day) enum Day { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday } - each constant, which is declared in one enumeration, is being associated with a certain integer[as their index] (if they are not explicity assigned) (like in array, it starts with 0) in the example above, Friday is 5 and Monday is 1. - it is possible to change the numerical value of constants in an enumeration - e.g. Sunday = 10 (so the value of Sunday will be 10 instead of 0, the rest of the days following will be Monday = 11, Tuesday = 12 and so on...) [we can only assing integers as values to the constants] - enums can also be used like this: public enum CoffeeSize //in CoffeeSizes.cs { Small=100, Normal=150, Double=300 } //called in Cofee.cs public CoffeeSize size; public Coffee(CoffeeSizes size) { this.size = size; } public CoffeeSize Size { get { return size; } } Coffee normalCoffee = new Coffee(CoffeeSize.Normal); Console.WriteLine($"The {normalCoffee.Size} coffee is {(int)normalCoffee.Size} ml."); //prints: The Normal cofee is 150 ml. - Whenever possible, use enumerations instead of set of constants declared in a class.
@benjaminlavigne22728 жыл бұрын
Thanks for tuning in at brackeyss
@pipeman66314 жыл бұрын
scary shit man
@kingn1257 жыл бұрын
thanks for your c# videos. by far one of the best in the net. you helped me alot :)
@tr33636 жыл бұрын
Excellent work you got me to programming again. I was learning python few months ago but I still wanted to learn something like C# or C++ Thank you for doing this tutorials! ;)
@dalicho297 жыл бұрын
OMG! Finally I undestood the concept with example of ENUMS, ty!
@IchorX5 жыл бұрын
7:34 really surprised me, that just came out of nowhere lmao.
@kimcorson44583 жыл бұрын
i love brackeys. he's a great teacher!
@JonnyRocksAW3 жыл бұрын
The most intellectual "fuck-up" you'll ever hear.
@zeroskill9904 жыл бұрын
Solid video and examples. Keep up the great work!
@JasperLaw9 жыл бұрын
Thanks brackeys! I adore this series, can't wait until the next episode! :D
@Layarion7 жыл бұрын
Cool.This is a good video; clear, simple, and mostly to the point.
@utkuliceli50667 жыл бұрын
I laughed way too hard at that chihuahua joke. Love the videos bro and the way you examplify uses for each and everything. Thanks.
@bip9015 жыл бұрын
I entered this video just to hear you say "enum" :D I always said it as in the beginning of "Enumerator" until someone laughed at my pronunciation...
@mathiasnielsen7038 жыл бұрын
Det er nogle lækre guides du har lavet dig. god til lige at få genopfrisket med. Også er det sjovt og se hvordan du får flere og flere programmer på dit skrivebord efter hver video. Især nu hvor du fik installeret Heartstone ^.^
@Tony-eh2ul8 жыл бұрын
chihuahua is ANGRY chihuahua SMASH :D
@DarrinLin9 жыл бұрын
Is there a reason why you chose to define your classes inside your MainClass?
@saifalramahi90469 жыл бұрын
+Darrin Lin yeah i need to know too
@nookiejj9 жыл бұрын
+Darrin Lin I think it is more easy to have everything in 1 file when tutoring people through a video. It eliminates having the tutor constantly switch through files.
@DarrinLin9 жыл бұрын
tislars I see, thanks. I think this would be a good thing to mention in the video.
@Sebruzz8 жыл бұрын
Cool tutorial as always... However, I ended up scrolling dog breeds for hours ;D
@footsoldier12x6 жыл бұрын
Great video, you explain things really well. Thanks.
@johnsmithee66604 жыл бұрын
Instead of Brackeys, this channel should now be called 'Fuck'eys
@zakkhan43938 жыл бұрын
Thank you very much for your tutorials they help out a lot
@naushsiddique64229 жыл бұрын
Found it very helpful. Thanks Brackeys !!!
@chaolihai-innit9 жыл бұрын
He's obsessed with dogs. Awesome
@Tektron-inc6 жыл бұрын
Thanks for the video, it was useful for me.
@lautarogarcia80384 жыл бұрын
Starts at 1:00
@cyborg62947 жыл бұрын
Thank you so much, you have a real talent.
@bamcodes9 жыл бұрын
Thanks man , this video is very helpful (y).
@CM-ng1ef9 жыл бұрын
Great tutorial brackeys ! Keep it up!
@satk42114 жыл бұрын
Awesome man thank you!!!!
@jonathanbourgoin80634 жыл бұрын
Thanks man, great help.
@IroquoisPliskin862 жыл бұрын
Whoa, was not expecting sexy voice Brackeys.
@RonSpwan115 жыл бұрын
Awesome, thanks!
@14karammv995 жыл бұрын
My only question regarding the comprehension - from the perspective of a true beginner: WHY ARE YOU USING NESTED CLASSES IN A BEGINNERS GUIDE?! COULDN'T IT HAVE BEEN SIMPLIFIED? O'lord.
@abaip94499 жыл бұрын
What happened to the challenges you did in the beginning, I liked those a lot.
@alidore62577 жыл бұрын
The tutorials with challenges were the best I'd ever done. They made me able to make up code myself.
@leluong87436 жыл бұрын
There are plenty on w3resource. Just search for c# challenges for beginner and you'll see it. Cheers
@mandinh183 жыл бұрын
7:34 oh watch out watch out watch out!! Randy Orton out of nowhere!! lol
@Alkhalidi442 жыл бұрын
LMAO
@galeelraglen3 жыл бұрын
Thank you :)
@muramasa75376 жыл бұрын
So enmuns are used for calling out names which is more useful for us when we have to use a lot of code .
@langningbao31364 жыл бұрын
When he created a new dog, the Dog hulk part, is that a new type that he created or is it the class that he created?
@deathgoldqwer8 жыл бұрын
Whats the Dif between enums and Enums. This video perfectly explains enums but i'm a tad lost to what [E]nums are.
@ernestorojo63338 жыл бұрын
+OP Tildeath they're essentially the same thing, except that enum is the c# type (like saying int or float) and Enum is the .Net class. There are parallels for other types, such as string/String or int/Int32. Typically you'll use the c# type to declare the thing and the .Net type for static class methods. For example: enum Color { Red, Blue }; Color colorValue; Enum.TryParse("Red", out colorValue);
@starinsky28736 жыл бұрын
I think how can c# used for programming unity it is just loop calculator something like that
@sebastianrasmussen82359 жыл бұрын
so you have been ekstreamly busy with Photoshop? Just joking Nice video!:)
@TheBcoolGuy9 жыл бұрын
If you wanted to create a game with ticks (as they're called in Minecraft) and wanted to bind all motion and animation to these ticks, to then be able to go in backwards ticks, what would you need to do with the loop to get it to work? :) (Like in Braid, sort of)
@kelvindecosta33629 жыл бұрын
By my understanding you mean to say you want time manipulation ?? All you have to do is make a script that changes the scale of time according to some input .... The editable variable Time.scale (not sure if its .scale or .timescale) can be changed ..... Its default value is 1 ....for slow motion you can change it in the script to 0.5 or anything less than 1 ....I'm not sure about -ve values.... Also if you want to manipulate time in the entire world except your character.....in your player character script use time.unscaleddeltatime..... Hope I helped
@goshinn6 жыл бұрын
pls don't kill me for this but what's wrong with using strings for breeds? at 7:01 Brackeys mentions that we can make a switch statement and that we have to support all different types of breeds. But couldn't the default case in switch statements account for all the cases we're not bothered by? Then we wouldn't have to "sit there and type in all of them" "easily broken"? does that refer to human errors like typing strings wrongly? We could use the console to see which line produces the errors right? Sorry if I sounded rude, also I'm still new to programming so I apologise if what brackeys is trying to say flew past my head >.> and would appreciate if someone could explain
@94D33M6 жыл бұрын
I think whats easier is that instead of remembering the breed name or the index, with enums you can now just press . and the list will come up( obviously you have to type in the list at the beginning with enum)
@jamesk74169 жыл бұрын
Thanks man!
@LunarBulletDev5 жыл бұрын
"Chihuahua called hulk" xD 9:06
@ThePeruvian0115 жыл бұрын
I had to scroll to far to find this hahha
@chaks24326 жыл бұрын
When I try to run the program it says "Cannot Implicitly convert type String to Project.MainClass.Breed" in "breed = _breed;"
@nicholascarr62516 жыл бұрын
What's happening is that _breed is still a string. So change it to Breed.
@nicholascarr62516 жыл бұрын
He gets the same problem at 9:16
@Kjobbit7 жыл бұрын
I don't understand how using an enum resolved the issue of using a switch statement. It just seems to be a simpler way of typing breed (giving you a multiple choice from a list) but beyond giving you a multiple choice what exactly does an enum do?
@OwenOzone6 жыл бұрын
I felt like I just heard Barney the Dinosaur swear when I heard that cuss! :p
@person18604 жыл бұрын
For anyone who's new, there's a 3-4 minute video that manages to go more in-depth about enums than this video.
@bigbirdlover7592 жыл бұрын
what video?
@person18602 жыл бұрын
@@bigbirdlover759 at this point 🤷
@bigbirdlover7592 жыл бұрын
@@person1860 lol
@w.d-gaster54164 жыл бұрын
one question, why do you have to create the enum at the Animal class and why you just cant create it at the dog class? i tried it and when i created a dog instance i couldnt set up a breed for it
@codytremblay89867 жыл бұрын
i'm still confused what this is.
@AdiHasArrived7 жыл бұрын
Ask me what you want to. You can also visit the forums on Brackey's official website and also Unity forums or some other programmer's forums.
@daveb75966 жыл бұрын
lmao first time i think ive ever heard him swear hahahaha love it.
@RobertGolusinski7 жыл бұрын
cool explenation, thank you sir
@kelvindecosta33629 жыл бұрын
Do you have an Asus Brackeys ?
@Layarion7 жыл бұрын
can i use enums in a Property?
@rowanharley98109 жыл бұрын
Can you make another group of tutorials like how to make a survival multiplayer game
Moiz Iftikhar thanks ! it's explanation was very clear :) do you have any other website links ?
@moizifty9 жыл бұрын
Ali Akbar sure, www.tutorialspoint.com/csharp/
@geldonrashidi45729 жыл бұрын
What enums are making easier???
@TGEnigma9 жыл бұрын
Only For Games it's like a dictionary of known 'types' with the ability to assign values to them so you it becomes easier to manage the possibly many different types programmatically.
@dannyboyno27 жыл бұрын
I am so spectacularly confused by what has been happening since #9 about arrays. This stuff is crazy for beginners. Sigh.
@zakkhan43938 жыл бұрын
Why isnt the enum breed inside the derived dog class?
@calabiyou9 жыл бұрын
Great.
@nhan15036 жыл бұрын
best!!!!!!!!
@iiplayingmodeii9 жыл бұрын
Please complete CreateAGame Series and thanks
@thek1llerbear6545 жыл бұрын
Oh I needed a Pixel Art ToolKit my other pixel art app was a kids coding app (Scratch) until they changed their way of saving sprites to some weird .sprite thing so i can't use its built in Pixel Editor
@huck64534 жыл бұрын
I still don't understand it :( I mean... The only reason why enums are useful is this list of values that appears when you write "Breed."? Because i don't see any practical way of using it
@SgtRegg5 жыл бұрын
after reading about and watching videos about enums i still cannot see a difference to simple string-arrays
@verdalyard3 жыл бұрын
Can someone explain to me, not a native speaker (I am upper-interm.), why does he say enum as [i:nm], not [i'nju:m], like is must be?
@drv50377 жыл бұрын
thx
@theloaten179 жыл бұрын
will you do Java script soon.
@chomychata43508 жыл бұрын
hye
@Ninjadudeadventures9 жыл бұрын
I do not know how to code at all and I am making a 2d Platformer with nothing but the Sample Assets that come with Unity 5 but I can not figure out how to make Spawn-point changes I have only what unity provided me and this is in C# can you please make a tutorial of how to do this Please.
@mrmoinn5 жыл бұрын
Did I just hear Brackeys swear!?!?!?
@FlamingSteed3 жыл бұрын
"...to like ehhh, fuck up so to say! :D"
@Ppstate329 жыл бұрын
ok so i started programming 2 days ago and i started wwith c#! i downloaded visual studio 2015 and writted a bunch of programs! but now im stuck with a problem! so im trying to write a program that guesses your chosen number! i know it can be done llike this:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { string number; Console.WriteLine("Choose a number!"); number = Console.ReadLine(); Console.WriteLine("Your number is " + number); Console.ReadLine(); } } } but i want to do it with some questions! Like i ask is the number higher than 100? and if they say yes i guess the number! or is the nubmer lower than 100? and if they say yes i guess the number! but i want both of these questions in 1 program! i tried if/else statements but i dont know how since when i use int i need to put a value of the number which i dont know yet since the "player" is going to chose it! can i get some help please???
@kaput89 жыл бұрын
zan colja 1) use the number as int not string. U can read int like this : Console.WriteLine("Choose a number!"); int number = Convert.ToInt32(Console.ReadLine()); 2) just make so else if statements. like q&a char answ; //anserw for short Console.WriteLine("question"); Console.ReadLine(asnw); if (asnw == y) { //U do wat u want if he answ yes } else if (answ == n) { //2nd question and shit }
@Ppstate329 жыл бұрын
yes i figured it out aleready made the program! also have you got any suggestions on a first game/ more advanced program??
@f0cus6436 жыл бұрын
Yea make a calculator
@williamsmith63646 жыл бұрын
Why no great DANE
@sneeznoodle4 жыл бұрын
Only in code will you ever hear the phrase "Public dog constructor"
@ZenChibiko9 жыл бұрын
Hi! Thanks for tutorial ) Cool, but when i sow tutors like this, i can't understand - where it can useful in Unity3D... No one shows examples ingame :D But for enums thanks. And it was so little about cases.
@prestonwallitsch86364 жыл бұрын
2:09, is anyone else disturbed at how he wrote East before South.
@rizqyfahmi83438 жыл бұрын
It's like array but selected by name? #IMHO
@AnasAhmed-ib1my8 жыл бұрын
its giving error whats wrong usingSystem; namespace Ri { class MainClass { enum Breed {bulldog, chuhuahua}; class Animal { enum Breed {bulldog, chuhuahua}; public string name; public int age; public float happiness; } class Dog : Animal { public Breed breed; public Dog (string _name, int _age, float _happiness, Breed _breed) { name= _name; age= _age; happiness= _happiness; Breed = _breed; } public void Printbase() { Console.WriteLine("Name: " +name); Console.WriteLine ("Age: " + age); Console.WriteLine (" Happiness : " + happiness); Console.WriteLine (" Breed" + Breed); } } public static void Main (string[] args) { Dog Bull = new Dog("Bull", 12, 0.2f, Breed.chuhuahua); Bull.Printbase (); Console.ReadKey(); } } }
@thanasis.malasidis8 жыл бұрын
On the 11th line of your code, you should remove: enum Breed {bulldog, chuhuahua}; You probably get an error because you have alredy declared an enum with the name Breed. Also, for future reference, when you have problems with your code and post it online you should give more information about the error you get.
@delcogoblin4 жыл бұрын
Never thought I'd hear you swear lol
@thotagangireddy86666 жыл бұрын
but nxopen tutorials please
@kevinmarmet6 жыл бұрын
My dogs name is Hulk! lol He is a Rott tho
@LIDOGAMES2 жыл бұрын
you were slow in old days!
@robertl84296 жыл бұрын
why create the example of north south east west and then delete it? its too confusing. i don't know why online programmers trying to teach people, spend time on an example, something basic, then delete it after 2 minutes. just when im following along with north south east west you switch to DOGS! confusing for beginners honestly.