Blog
[Solved][Python] Numpy Erorr: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
When using Numpy format data for conditional judgment, sometimes we get the following error message:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Read More »[Solved][Python] Numpy Erorr: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()[Python] How To Convert Numpy Data Format To Tuple Or List
When we talking about data processing related to arrays and multiple dimensions, you will think of Numpy. This is because Numpy as an optimized library composed of C/C++ and Fortran, and its computational efficiency is very fast.
Read More »[Python] How To Convert Numpy Data Format To Tuple Or List[Unity] Use SortingIndex() To Change the Order of Objects in the Specific Layer
To make the SortingIndex()
function effective, we need to set the Sorting Layer.
[Unity] Use SetSiblingIndex() To Set the Order of Child Game Object
Today I want to record how to use SetSiblingIndex()
function to set the order of child game object under the parent game object in Unity.
[Unity] How to Use Random to Generate Random Numbers
The random numbers can be seen everywhere in a game, regardless of the character's ability or the enemy location, we can all use random numbers to determine.
Read More »[Unity] How to Use Random to Generate Random Numbers[Unity] How to Process Trigger and Collision Event
In the process of making games with Unity, we usually need to deal with some collisions of game objects. For example: Get items, Hit the wall... and so on in different situations. At this time, we can OnCollisionEnter()
and OnTriggerEnter()
to handle collisions and trigger events.
[Solved][Unity] Use “trigger” to Trigger but Rigidbody Does Not Simulate Collision
I recently use Unity to develop when a snake game, I want to delete the head game object when my snake head collides with another snake's body, I need to use OnTriggerEnter2D()
to set the collision determination.
[Unity] Generate and Delete Objects with Program
In the process of making the game with Unity, we cannot manually place all game objects we need. In other words, sometimes we need to automatically generate or delete game objects.
Read More »[Unity] Generate and Delete Objects with Program[Unity] Button Event: OnPointerDown() and OnPointerUp()
The button component is built in the Unity UI layout, so we can simply to create the function to trigger the button event when user clicking. But if it is necessary to set the events of the button "pressed" and "released" separately, we can write a script to inherit the Button class, and override the OnPointerDown()
event and OnPointerUp()
event.