일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- inheritance
- member function
- Linear Regression
- least square
- Overloading
- regression
- Machine learning
- 맵리듀스
- 최소제곱법
- Class
- virtual function
- Effective C++
- call by value
- 지도학습
- 비선형 함수
- struct
- local minimum
- c++
- overriding
- MapReduce
- kubernetes
- Nonlinear Model
- 선형모델
- 딥러닝
- 비선형모델
- 회귀
- 머신러닝
- Nonlinear Function
- call by reference
- 회귀학습
- Today
- Total
목록Computer Language/Unity (20)
J's Study log
Prefab Prefab is a file of an object which is not materialized in game, but you can use it by script, such as 'public GameObject stone;'.To make a Prefab you have to drag an object from Hierarchy View to Game View. Class Inheritance If you write another class name instead of MonoBehaviour the class inheritates the other. For example, public class B : A { } In this code class B inherits class A. ..
Time.deltaTime - Returns how long did the last frame took to complete, and it's unit is second. We can use this mechanism like this float timeCount = 0;void Update(){timeCount += Time.deltaTimeif (timeCount > 3){Debug.Log("Throw the stone");timeCount = 0}... We can print log every 3 seconds if we code like this.
You can make UI by Game Object -> UI. Text - You can write text and print something like count of coin.
To use script A's function in script B. You have to declare function as public function like this. And now you can use RestartGame() in other scripts. Funny thing to know that when you declare a variable public you can see it in Inspector. You can see Coin Count and also you can change the value in real time. Just like I said, because you can change the value in real time, you should reset value..
Use 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..
Crush When two objects crush on each other at least one object must have Rigidbody, and both of them must have Collider. And if only one object moves and crush the moving object must have Rigidbody. Collision Collision detects crush following physical operation. But you have to make sure that Rigidbody -> Kinematic is off. OnCollisionEnter(Collision col) - Will happen when the object crush on th..