728x90 IT256 유니티 게임 프로그래밍 8장 예제 구현 BulletSprite using UnityEngine; using System.Collections; public class BulletSprite : SpriteBase { public float Speed = 10.0f; // Use this for initialization void Start () { gameObject.AddComponent(); gameObject.rigidbody.useGravity = false; gameObject.AddComponent(); gameObject.collider.isTrigger = true; } // Update is called once per frame void Update () { float moveAmount = Speed * Time.delta.. 2021. 5. 30. 유니티 게임 프로그래밍 6장 예제 구현 BulletSprite using UnityEngine; using System.Collections; public class BulletSprite : SpriteBase { public float Speed = 10.0f; // Use this for initialization void Start () { gameObject.AddComponent(); gameObject.rigidbody.useGravity = false; gameObject.AddComponent(); gameObject.collider.isTrigger = true; } // Update is called once per frame void Update () { float moveAmount = Speed * Time.delta.. 2021. 5. 30. 유니티 게임 프로그래밍 5장 예제 구현 BulletControl using UnityEngine; using System.Collections; public class BulletControl : MonoBehaviour { public float Speed = 20.0f; // Update is called once per frame void Update () { float moveAmt = Time.deltaTime * Speed; transform.Translate(Vector3.forward * moveAmt); if(transform.position.z > 35.0f) { Destroy(gameObject); } } } EnemyControl using UnityEngine; using System.Collections; public.. 2021. 5. 30. 유니티 게임 프로그래밍 4장 예제 구현 BulletControl using UnityEngine; using System.Collections; public class BulletControl : MonoBehaviour { public float Speed = 20.0f; // Update is called once per frame void Update () { float moveAmt = Time.deltaTime * Speed; transform.Translate(Vector3.up * moveAmt); if(transform.position.y > 7.0f) { Destroy(gameObject); } } } EnemyControl using UnityEngine; using System.Collections; public class.. 2021. 5. 30. SIMD 프로그래밍 사칙연산과 제어문 // add.cpp : Defines the entry point for the console application. // #include "stdafx.h" int main(int argc, char* argv[]) { int A = 5; int B = 7; int C = 0; __asm { pushad mov eax, A//eax = A 값 대입 mov ebx, B//ebx = B 값 대입 add eax, ebx//eax = eax + ebx; mov C, eax//C = eax 대입 popad } printf( "5 + 7 ADD Result : %d\n", C ); return 0; } // div.cpp : Defines the entry point for the console applicati.. 2021. 5. 30. 파이썬 네이버 로그인 에러 - 내 일을 바꾸는 업무 자동화 14장 debug_1.py int('string') debug_2.py from my_error import raise_error raise_error() error_1.py data = 10 if data > 0: print('ok') print('error') error_2.py data = 10 if data > 0: print('ok') print('error') error_3.py data = 10 if data > 0: print('ok') if data > 5: print('ok2') print('error') error_4.py value = 100 print(vaiue) error_5.py from selenium import webdriver driver = webdriver.Chrome('... 2021. 5. 29. 파이썬 11번가 봇 만들기 - 내 일을 바꾸는 업무 자동화 13장 13.1 from selenium import webdriver from openpyxl import Workbook, load_workbook from os.path import exists from datetime import datetime import string today = datetime.now() monitor_path = '/Users/Alghost/Downloads/' today_file_name = '%d_%d_%d.xlsx'%(today.year,today.month,today.day) file_path = monitor_path + today_file_name if exists(file_path): result_xlsx = load_workbook(file_path) else: r.. 2021. 5. 29. 파이썬 자동화 소스 코드 - 내 일을 바꾸는 업무 자동화 12장 from selenium import webdriver opts = webdriver.ChromeOptions() opts.add_argument('headless') opts.add_argument('window-size=1920,1080') driver = webdriver.Chrome('/Users/Alghost/Downloads/chromedriver',options=opts) try: driver.get('http://naver.com') print(driver.title) except Exception as e: print(e) finally: driver.quit() 2021. 5. 29. 파이썬 텔레그램 봇 만들기 - 내 일을 바꾸는 업무 자동화 11장 11.4-1 import telegram token = '발급받은 토큰' bot = telegram.Bot(token) bot.send_message(채팅ID, '메시지') 11.4-2 import telegram token = '962058964:AAG5G53iMXjqjHWPE8d17FDgnE0lC_-pnhA' bot = telegram.Bot(token=token) bot.send_message(57841042, '메시지') 11.4-3 import telegram token = '962058964:AAG5G53iMXjqjHWPE8d17FDgnE0lC_-pnhA' bot = telegram.Bot(token=token) bot.send_photo(57841042, open('사진 파일 경로', 'rb.. 2021. 5. 29. 이전 1 ··· 3 4 5 6 7 8 9 ··· 29 다음 728x90