Skip to content

Instantly share code, notes, and snippets.

View DongguemYoo's full-sized avatar

DongGeumYoo DongguemYoo

View GitHub Profile
@DongguemYoo
DongguemYoo / drawline.cs
Last active April 22, 2020 07:16
그림그리기 테스트
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
using System.Linq;
public class DrawLines : MonoBehaviour
{
@DongguemYoo
DongguemYoo / shiftList.cs
Last active April 24, 2020 01:34
shiftList
void ShiftPoints()
{
//max카운트 넘어가면 시프팅을 시작한다
if (AllPoints.Count <= MaxCount)
return;
for (int i = 0; i < MaxCount; i++)
{
AllPoints[i] = AllPoints[i + 1].y;
}
public FileToDict()
{
var lines = File.ReadAllLines("fileName.txt");
var dict = lines.Select(line=>line.Split('='))
.ToDictionary(x=>x[0],x=>x[1]);
(왼쪽)=키,(오른쪽)=발류
}
기존 코드
public delegate void CoilLineState(float num1,float num2);
public void OnCoilLineState(float num1,float num2)
{
EntryCoil.CoilLookAtOnShiftingLine(num1);
DeliveryCoil.CoilLookAtOnShiftingLine(num2);
}
params로 변경후
@DongguemYoo
DongguemYoo / transparent.cs
Last active April 24, 2020 02:16
투명화
이전 메터리얼 저장
{
Material[] newMat;
newMat = Equip.GetComponent<MeshRenderer>().materials;
Arrow.GetComponent<Panel_TutoInfo>().mat_Prev = newMat;
}
@DongguemYoo
DongguemYoo / TextShift.cs
Created April 24, 2020 02:22
unity getter setter 예제
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class TextShift : MonoBehaviour
{
public Material material;
public GameObject RootObj;
public CapsuleCollider[] allCoilliders;
@DongguemYoo
DongguemYoo / CoilShulink.cs
Created April 24, 2020 02:30
Unity GameObject 크기 조절 함수(smooth)
@DongguemYoo
DongguemYoo / 크레인 인형 뽑기.cpp
Last active May 22, 2020 05:41
코딩테스트 연습 - 크레인 인형 뽑기(c++)
//보드쌓는 방식 x,y를 거꾸로 보고 해결하려고 해서 계속 에러가
#include <string>
#include <vector>
using namespace std;
int solution(vector<vector<int>> board, vector<int> moves) {
int answer = 0;
vector<int> result;
@DongguemYoo
DongguemYoo / 모의고사.cpp
Last active April 27, 2020 07:29
코딩테스트 연습 모의고사
//거의 인터넷 보고 푼 수준
//최대값 정렬하는데서 엄청 해맴
#include <string>
#include <vector>
using namespace std;
vector<int> solution(vector<int> answers) {
@DongguemYoo
DongguemYoo / 체육하러가즈아.cs
Created April 27, 2020 07:15
코딩테스트 체육복
using System;
public class Solution {
public int solution(int n, int[] lost, int[] reserve) {
int answer = 0;
int[] t_lost = new int[n];
int[] t_reserve = new int[n];
for(int i=0;i<n;i++)