C # Game development high-speed Novice tutorial Unity5.5 tutorial

Source: Internet
Author: User
Tags naming convention

C # Game development high-speed Novice tutorial Unity5.5 tutorial


Probation Document: Http://pan.baidu.com/s/1slwBHoD

C # is a high-level programming language published by Microsoft. The language, like the C language, has become a must-learn language for university computer-related majors. A lot of students who have studied this language have thought that C # can only develop Windows desktop applications and write an ASP.

This book will correct this concept for readers, using C # like to develop a wonderful game!

Directory

1th. Preparing for the game before you use C # 1

1.1 Unity Overview 1

1.1.1 Unity Brief Introduction 1

1.1.2 Unity's Download 1

1.1.3 Installing Unity 3 Online

1.1.4 Offline Install Unity 4

1.1.5 Starting Unity 6

1.2 Games Items 7

1.3 Viewing the reference manual for a specific component 9

1.4 Creating and editing C # scripts 11

2nd Chapter Build the first game 14

2.1 Building a game scene 14

2.1.1 New Game Scene 14

2.1.2 Join the Game object 15

2.2 Changing the game object State 16

2.2.1 Using main camera and game view 16

2.2.2 Using Transform Components 18

2.2.3 manipulating game objects directly 19

2.3 Scene view Quick action 20

2.4 Using Scripts 22

2.4.1 Demo sample effect show 22

2.4.2 the composition of the script 23

2.4.3 How to assign a script to a game object 25

2.4.4 Execution Game 26

2.5 Summary 26

3rd. Properties of the game object--variable 27

3.1 Properties of the game object 27

3.2 Name of the reference data 28

3.2.1 Variable naming rules 28

3.2.2 Variable naming Convention 28

3.2.3 variable name differs from attribute name 29

3.3 Visibility of property names 29

3.4 Setting the data type of a property 30

3.4.1 Data Type 30

3.4.2 the embodiment of the property data type 31

3.5 Using script variables 32

3.5.1 declaring a variable 32

Initialization of the 3.5.2 variable 33

Operation of the 3.5.3 variable 33

3.5.4 member Variable 33

Scope of the 3.5.5 variable 35

3.6 Statement 36

3.7 Game Demo Sample 37

3.8 Summary 39

4th: The behavior logic of the game object--method 40

4.1 Behavior logic for game Objects 40

4.2 Methods in the script 40

4.3 Using the Scripting Method 41

4.3.1 Methods and Variables 41

4.3.2 Definition Method 42

4.3.3 Calling Method 42

4.3.4 Method using Demo sample 43

4.4 Unity Built-in method 44

4.5 Parameters of the method 46

4.5.1 The role of the number of references 46

4.5.2 the actual meaning of the game 46

4.6 Reducing the number of repeated writes of code 48

4.7 Game Demo Sample 50

4.8 Summary 53

The 5th chapter of the game running path selection-Inference 54

5.1 Running path of the game 54

5.2 Infer the player's Choice 54

5.2.1 Most frequently used inference statements--if 55

5.2.2 If Statement game Demo sample 56

5.2.3 Other inference Statements 59

5.3 loops through each data. and make inferences 60

5.3.1 Storage and reference of large amounts of data 61

5.3.2 traversing large amounts of data 64

5.4 Game Demo Sample 67

5.4.1 Game Execution Effect 68

5.4.2 Game Implementation Step 69

5.4.3 Game Script Writing 69

5.5 Summary 75

6th. Communication between game Objects 76

6.1 Outside of the game embodiment 76

6.2 Embodiment within the game 77

6.3-point operator 78

6.3.1 objects, components, and classes 78

6.4 Using the dot operator in a script 79

6.4.1 the component's own properties and methods 79

6.4.2 access to other components on the same object 80

6.4.3 access to components on other objects 81

6.5 Game Demo Sample 83

6.6 Summary 87

7th: The center of Game-state management mechanism 88

7.1 Overview 88

7.2 Workflow 89

7.2.1 Game Status 89

7.2.2 Grant game control to game State 89

7.2.3 Game State Switching 90

7.2.4 Real-time recording of the current state of the game 90

Instantiation of Class 7.3 91

7.4 Introducing the Interface 94

7.4.1 Interface Overview 94

7.4.2 Demo Sample Demo 95

7.5 Summary 97

8th Chapter State Management mechanism using Demo sample 98

8.1 Join the Game State 98

8.2 Core script control of game State 100

8.2.1 Core script encountered issue 100

8.2.2 Demo Sample Demo 1 101

8.2.3 Demo Sample Demo 2 102

8.3 Ongui () 103 in the core script

8.3.1 joined Ongui () 104

8.3.2 Demo Sample Demo 1 104

8.3.3 Demo Sample Demo 2 106

8.4 Switching of the game scene 107

8.4.1 Join the game scene 107

8.4.2 introduction of problems and Solutions 109

8.4.3 Demo Sample Demo 110

8.5 Demo Sample Code 113

8.5.1 Core Script 113

8.5.2 Interface Istatebase 114

8.5.3 Game Status 114

8.6 Summary 117

The 9th Chapter Game Demo Sample-capsule purification War 118

9.0 Game Plot Synopsis 118

9.1 Building a game frame 118

9.1.1 Game Execution Flowchart 119

9.1.2 Core Script 119

9.1.3 Interface 120

9.1.4 Game Status 121

9.1.5 Framework Execution Effect 126

9.2 Storing game Data 128

9.3 Join the Game splash screen 130

9.4 Adding "capsule" player object 133

9.5 Setting of "capsules" 135

9.5.1 adding a Script Component 136

9.5.2 can rotate the capsule 136

Color selection of 9.5.3 capsules 141

9.5.4 Capsule Health Setting 145

9.5.5 Switch to the next game State 146

9.6 The movement of the capsules 147

9.6.1 adding a rigid body component 148

9.6.2 code for moving effects 149

9.6.3 Mobile Effect Show 151

9.7 Switching of the game view 152

9.7.1 adding cameras 152

9.7.2 implementing the View switching function 154

9.7.3 Apply to Games 158

9.8 The desolate planet and its Aborigines 163

9.8.1 joins the desolate ground 163

9.8.2 Aboriginal people: Probiotics and Ebola virus 165

9.9 Capsule Evolution Tour 169

9.9.1 Vicious Ebola virus 169

The purification process of 9.9.2 virus 172

9.9.3 time to trigger the purge 175

9.10 added game score and health 178

Rules of the 9.10.1 game 178

9.10.2 fraction and health increase or decrease by 180

9.10.3 game Transitions of each State 181

9.10.4 score and Health on the game View 187

9.11 Game Flowchart and Source code Overview 188

9.11.1 Game Execution Flowchart 189

9.11.2 Core Script 189

9.11.3 Interface 191

9.11.4 Game Status 191

9.11.5 Other feature Scripts 201

9.12 Summary 206


C # Game development high-speed Novice tutorial Unity5.5 tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.