일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- call by value
- 지도학습
- Overloading
- least square
- kubernetes
- Class
- inheritance
- overriding
- 비선형 함수
- member function
- 맵리듀스
- 최소제곱법
- Nonlinear Model
- regression
- 회귀
- call by reference
- local minimum
- MapReduce
- 회귀학습
- virtual function
- Machine learning
- Linear Regression
- c++
- struct
- 선형모델
- 딥러닝
- 비선형모델
- 머신러닝
- Nonlinear Function
- Effective C++
- Today
- Total
J's Study log
[Unity] Tag / Applied Learning(Eating Coins, Game Manager) 본문
[Unity] Tag / Applied Learning(Eating Coins, Game Manager)
정우섭 2019. 3. 4. 23:38Use Material to change Coin Object's color and look. Make a new script for Coin Object and code Destroy(gameObject); in OnTriggerEnter function to make the Coin disappears. Add some other codes for the events you want to make happen.
After making few coins, you need to tag coins to administrate coins easily.
Click Add Tag in Inspector and make a Tag and you can separate objects easily Tag by Tag.
In script GameObject.Find("object name"); returns only one object, but GameObject.FindObjectsWithTag("tag name") returns list of object in tag.
So with this code you can use coin objects by coins[] list.
Game Manager
Game Manager is a script that administrates the whole game. It means that many events in other scripts are actually activated by Game Manager script. In this way we can control the game easier then using every scripts.
Use this code to return a message form other scripts functions.
'Computer Language > Unity' 카테고리의 다른 글
[Unity] UI (0) | 2019.03.06 |
---|---|
[Unity] Pubilc (0) | 2019.03.06 |
[Unity] Trigger and Collision (0) | 2019.03.02 |
[Unity] Local Transform (0) | 2019.02.27 |
[Unity] Parents and Child Object (0) | 2019.02.27 |