Home>
Suppose Test.cs is attached to the Player character in Unity.
The question is
Public class Test: MonoBehaviour
{
private bool isRun = null;
private float _walkSpeed = 2.0f;
private float _runSpeed = 2.0f;
void Update(){
float moveSpeed = isRun? _runSpeed :_walkSpeed;
Debug.Log(moveSpeed);
}
}
What does the bold part above mean?
float moveSpeed = isRun? _runSpeed :_walkSpeed;
Also, what would it be if this were briefly described?
*Animator component is attached to the Player character,
In the parameter of AnimationController in that, bool is Run is set.
-
Answer # 1
-
Answer # 2
It's the definition of class name and function name.
I can't describe it more easily
-
Answer # 3
>Bold text
Which side is it?
Related articles
- please tell me the description method when turning with for when calling the element in the object of javascript
- c# method of deleting the specified character string or later or method of extracting the character string to the left of the sp
- ruby on rails ruby calculation method description method
- html - about the description method of css reflected only in ie
- c# abstract class, abstract method
- css - [method consultation] html description method for img smartphone site and pc site
- c# - i want to call a method that has a return value with reactivecommand and get the result
- c# - about learning method of data management in game programming
- dns - bind zone file description method for multiple domains
- c# excel sheet name selection method in combo box
- c# - about changing the bool value in the method
- python - in the description of the method of the inheritance parent class, it says "def test ()-> list:" what does
- android - about description method when implementing coroutinescope by mainscope ()
- if sass description method is used in vscode, completion candidates for properties do not appear, so i would like to improve
- javascript - i want to know the correct description method on the right on rubyonrails → wherenot (id: ◯◯, id: □□) * ◯◯ is an in
- java - about html description method when creating dynamic form
- c# - [wpf] [mvvm] about the parameter acquisition method at the time of screen transition
- i have a question about the c# close method not closing
- javascript - about description method when importing react
Trends
- python - you may need to restart the kernel to use updated packages error
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to check the type of a shell script variable
- i want to call a child component method from a parent in vuejs
I think it is good to google with the ternary operator.
I wonder...