Question app.codility.com My Solution app.codility.com function solution(A, K) { K = K%A.length; if (K === 0) return A; let AA = A.concat(A); return AA.slice(A.length-K, A.length-K+A.length); } Note The rotation of string A is a substring …
Question app.codility.com My Solution app.codility.com function solution(N) { let input = N; let count = 0; let maxCount = 0; let startCount = false; while (input > 0) { let bit = input%2; if (bit === 0) { if (startCount) count++; } else {…
stackoverflow.com When seeing this issue, just change the architecture to standard.
That's a weird and nonsense situation!
In recent project, I have to connect the input from Processing to Unity through osc. So, I wonder if I can execute Processing using comand line and execute it within C# script. To do so, in OSX it's simple to install processing-java from t…
In a recent project, I'm dealing with a great amount of sprites. Eventually, the memory leakage is inevitably happened, and my app crash when loading the scene. (This project was developed to build on iPad) All I get from XCode is "Termina…
Like conveyor or river, when implementing these kinds of elements, I would consider to rolling repeated texture. Here's the following steps: (no script) 1. Use UI Raw Image, so you can manipulate UV Rect Offset. 2. Change texture Wrap Mode…
Recently, I tried to play animation using a series of images. It's five characters on the screen and each one is in "380x1300" resolution. Each animation of default state lasts for 4 seconds and 120 frames in total. Things all look normal …
It's quite common to execute functions for every period of time. And the following is the method I mostly used: void Start () { nextTime = Time.time; interval = 1; // every single second } void Update () { if (Time.time > nextTime) { nextT…
The isometric style is a new trend in game art or visual design. The style is like the following illustration (done by me) It's about a new perspective of viewing objects. Observing from above that all the three vanishing points are at inf…
Playing video in games is sometimes inevitable, especially when there's some cutscenes, which is too complicated to implement in codes. At first, when it comes to playing video in Unity, there's only MovieTexture, which didn't support iOS …
Raycast is a typical way to cast a beam from the camera to the designated position as a use of detecting click or touching. In general, raycast on a 3D object can be implemented as the following: (just remember an object with a collider ca…
Blend mode is like the following: You can find them in Photoshop, Illustrator, or some other software. One day I wanna do the effect of blending in Unity, and I found there's no sufficient material online. All I found is the following asse…