본문 바로가기

전체 글

(30)
JavaScript Tip (2) - Using tip (1) for undo and redo function in array https://github.com/SoftwareDevJake/JS_UndoRedo/blob/master/UndoRedo.html GitHub - SoftwareDevJake/JS_UndoRedo Contribute to SoftwareDevJake/JS_UndoRedo development by creating an account on GitHub. github.com This is about undo and redo function in an array if you are dealing with changing array's value. It'd be possible to use this in other case right? For example of this code, I added four fun..
자바스크립트 팁 (2) - (1)을 활용하여 배열에서의 undo, redo 기능 만들기 https://github.com/SoftwareDevJake/JS_UndoRedo/blob/master/UndoRedo.html 지금 구현하는 기능은 사용하는 배열에 변화를 주는 코드를 사용할 때 실행 취소 Undo 와 다시 복구 Redo 기능입니다. 같은 로직을 사용하면 다른 곳에서도 활용을 할 수 있겠죠? 저는 간단한 예시를 위해 배열에 값을 넣는 add, 배열에 넣은 마지막 값을 빼는 delete, 핵심 내용인 Undo, Redo 이렇게 네가지 기능을 만들었습니다. 기본적으로 필요한 세가지 입니다. 현재 배열 상태인 array, 실행취소로 돌아갈 형태를 저장하는 pastArray 배열에 넣을 값을 대신할 index 이렇게 세가지를 선언 해주고 명령어 command는 위와 같이 prompt를 이용하..
JavaScript Tip (1) - saving array into another array When you want to save an array into another array Arrays in another array will become same as above. But there's a real simple way to fix it with array.flat([]) Let's give it a try. if you exchange push array as above You can see the correct form!
자바스크립트 팁 (1) - 배열 안에 배열 저장 자바스크립트에서 배열 안에 또 다른 배열을 저장하고 싶을 때 배열에 그냥 다른 배열을 넣게되면 앞에 넣었던 배열도 나중에 넣은 배열과 같게 됩니다. 하지만 정말 간단하게 고칠수가 있더라구요. 바로 array.flat([])을 사용하는건데 다음과 같이 바꿔 봅시다. 위와 같이 배열 안에 넣을 또 다른 배열을 .flat을 이용하여 넣어주면 문제 없이 들어간걸 볼 수 있습니다!
Starting TCP by Unity (3) - Practice In this time, we will send and receive data between Server and Client. Now let's try with clicking a button info to send and receive. Right click on Hierarchy to create a Button. And then right click again in Assets/Scripts to create a script named as ButtonControl. Then put the script into an empty object named ButtonControl. And put a simple code as above. Follow the steps I wrote to put the f..
Starting TCP by Unity (2) - Client https://soja-dev.tistory.com/4 유니티 TCP 시작하기(1) - Server 먼저 C#을 활용하여 Server를 만든 후 유니티를 활용하여 Client로써 Server에 접속할 것이다. 그럼 먼저 Server를 만들어 보자. https://github.com/SoftwareDevJake/TCPServer GitHub - SoftwareDevJake/TCPServ.. soja-dev.tistory.com If you completed making a server by above, then now let's make a client to connect to it https://github.com/SoftwareDevJake/TCPClient GitHub - SoftwareDevJake..
Starting TCP by Unity (1) - Server I'm going to make a server with C# first then make Client with Unity to connect to the Server. So let's make Server part first. https://github.com/SoftwareDevJake/TCPServer GitHub - SoftwareDevJake/TCPServer Contribute to SoftwareDevJake/TCPServer development by creating an account on GitHub. github.com Get files from about by using "git clone" After you get all of them, just simply open Console..
Unity tips for Beginner (2) - Dealing with static string and int This tip is connectable with my first tip and every developers sholud know about this tip! When a developer writes some codes, there are some static string or int. It's easy to take care of the whole codes by doing this. Because I announced it with static, I don't need to put this script into the code where I need it!