Nội dung text G10S2 Session 01.pdf
(Explore) [Object Oriented Programming ] (10 Minutes) Q) What do they think the words public, and class mean? Q) How about the word MonoBehaviour? دي حاجات احنا مشرحنهاش ومكناس عارفين استخدامهم او اية فايدتهم-> عايزين نبدأ نتعلم عنهم C# عن search يعملو خليهم - Google about C# C# is Object-Oriented Programming language Object-Oriented Programming - Explain Object idea - Attributes - Methods - Classes ممكن نشرحهم بمثال team Football في ال Guide Teacher In a football match, all players (objects) share some attributes like run speed, position, name and number, actions (methods) like shooting and dribbling and strategy (class) which define their tactics and how they behave based on each player’s attributes. =========================================== (Explore) [Classes] (15 Minutes) What are Classes and Objects and how do they relate? You can think of cars as 'objects' and their common characteristics as 'classes'. 1. Classes as Blueprints: Think of a class as a blueprint or template for creating cars. It defines what a car should look like and what it can do. This blueprint includes details like the car's name, model, color, (Attributes) and the actions it can perform, such as driving, honking, and stopping (Methods). - هو الشكل الرئيسي / التصميم/ lines Guide للشكل اللي مفروض تكون عليه العربية مثل - ف ممكن نعمل class يوصف كل حاجة موجودة عندي ال الدنيا 2. Objects as Individual Cars: Now, when you create a car in your game using that blueprint, you're making an 'object.' Each object is a unique, individual car with its own set of characteristics. For example, you might create a red sports car object and a green car object. They both follow the instructions from the blueprint (class), but they can have different colors, speeds, and behaviors.