전체 글(193)
-
2주차 iOS 수업 내용 및 수업 후 과제
코드는 Flappy Bird 게임을 만들기 위한 GameViewController.swift 파일로, SpriteKit을 사용하여 게임을 구현하는 데 필요한 뷰 컨트롤러입니다. 각 줄에 대해 주석을 달아서 쉽게 설명할게요.// GameViewController.swift// FlappyBird// Created by Nate Murray on 6/2/14.// Copyright (c) 2014 Fullstack.io. All rights reserved.import UIKit // iOS의 기본 UI 라이브러리를 가져옵니다.import SpriteKit // SpriteKit은 2D 게임 개발을 위한 라이브러리입니다.extension SKNode { // SKNode(모든 SpriteKit 객체의 기본 ..
2025.09.09 -
1주차 iOS 기초 수업 내용 및 수업 후 과제
우리나라와 전세계의 모바일 점유율 비교 ↑// chat gptfor i in 1...10 { if i == 1 { print("\(i): 홍길동") } else if i == 2 { print("\(i): 홍길동") } else { print("\(i): 홍길동") }}// wrtnfor i in 1...10 { print("\(i): 홍길동") // 숫자 다음에 콜론과 홍길동을 붙여 출력합니다.}출력결과1: 홍길동2: 홍길동3: 홍길동4: 홍길동5: 홍길동6: 홍길동7: 홍길동8: 홍길동9: 홍길동10: 홍길동를 잘 활용하려면 어떤식으로 질문해야하는지 예를 들어 설명해줘ChatGPT의 말:좋아요! 제가 잘 활용되려면 질문을 구체적·명확하..
2025.09.02 -
모바일 게임 프로그래밍 3주차 소스코드 정리
using UnityEngine;public class CubeScripts_jsy : MonoBehaviour{ // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { transform.Translate(0, 0, 1); gameObject.AddComponent(); } // Update is called once per frame void Update() { }}// 3주차 실습1using UnityEngine;public class SphereScripts_jsy : Mono..
2025.03.18 -
14주차 유니티 게임프로그래밍
실습1실습2실습3실습4실습5실습6 주석 제거 해서 빨간 박스 안사라지게실습6 주석 제거 안하고 빨간 박스 사라지게실습 응용 공 생성 + 튀어오르기S , X 키 누르면 각각 공 생성3, 5 초에 한번씩 각각 공 생성//Z키를 누르면 복제본 생성using System.Collections;using System.Collections.Generic;using UnityEngine;public class Injsy : MonoBehaviour{ public GameObject nameC; // nameC의 하얀 Cube의 prefab으로 연결 void Update() { if (Input.GetKeyDown(KeyCode.Z)) Instantiate(nameC, ..
2024.12.10 -
13주차 유니티 게임 프로그래밍
실습1실습2실습3실습4실습5실습6실습7// 실습1 ‘ball약자’스크립트를 생성하여 tag가// ‘YCoin’인 객체, 즉 공이 동전과 충돌하면 동전이 사라짐using System.Collections;using System.Collections.Generic;using UnityEngine;public class balljsy : MonoBehaviour{ void OnTriggerEnter(Collider col) { if (col.tag == "YCoin") Destroy(col.gameObject); }}// 실습2 Coin(5)를 지나가면 그 공이 사라지도록 using System.Collections;using System.Collections...
2024.12.10 -
12주차 유니티 게임프로그래밍
실습1실습2실습3실습4실습5실습6// 여러개의 코인 먹기using system.collections;using system.collections.generic;using unityengine;public class coinjsy : monobehaviour{ void ontriggerenter(collider col) {// 충동한 객체가 구이면 if (col.gameobject.name == "sphere") { //z축으로 회전 gameobject.transform.rotate(0, 0, 90); } } void update() { }}// 실습1 코인이 공과 충돌하면 Y축으로 10의 위치로 이동using Sy..
2024.12.10