본문 바로가기
728x90

분류 전체보기1582

명강의로 완성하는 C프로그래밍 4장 #include int main(void) { printf("%c\n", 'A'); printf("%c\n", 'A' + 1); printf("%c\n", 'C'); printf("%d\n", 'A'); printf("%d\n", 'A' + 1); printf("%d\n", 'C'); printf("%c\n", 65); printf("%c\n", 65 + 1); printf("%c\n", 67); return 0; } #include int main(void) { int x = 10; putchar('B'); putchar('\n'); printf("%c\n", 'A'); printf("x는 %d 입니다.\n", x); return 0; } #include int main(void) { printf("%.. 2021. 5. 30.
명강의로 완성하는 C프로그래밍 1~3장 #include int main(void) { printf("Hello, World!\n"); return 0; } #include int main(void) { char ch = 'A'; return 0; } #include /* 이 구간의 코드는 모두 주석문입니다. */ int main(void) { //결과를 저장하는 변수입니다. int nResult = 10; char ch = 'A';//사용자 입력 //printf("Hello, World!\n"); return 0; } #include #include int main(void) { double dData = 123.456; printf("%f\n", dData); printf("%E - %E\n", DBL_MIN, DBL_MAX); return.. 2021. 5. 30.
유니티 게임 프로그래밍 18장 예제 구현 CSVDemo using UnityEngine; using System.Collections; using System.Collections.Generic; public class CSVDemo : MonoBehaviour { public TextAsset csv; void Start () { csv = (TextAsset)Resources.Load("ExampleCSV"); CSVReader.DebugOutputGrid( CSVReader.SplitCsvGrid(csv.text) ); PlayerPrefs.SetString("Player Name", "Foobar"); } } CSVReader using UnityEngine; using System.Collections; using System.Linq.. 2021. 5. 30.
유니티 게임 프로그래밍 16장 예제 구현 BeetleControl using UnityEngine; using System.Collections; public class BeetleControl : MonoBehaviour { public Vector3 targetPos = Vector3.zero; public float MoveSpeed = 5.0f; public GameObject HitEffect; public GameObject DeadEffect; public int HP = 300; public enum BeetleState { IDLE = 0, WALK = 1, ATTACK = 2, HIT = 3, SIZE } private BeetleState state = BeetleState.IDLE; // Use this for initia.. 2021. 5. 30.
유니티 게임 프로그래밍 12장 예제 구현 Movement using UnityEngine; using System.Collections; public class Movement : MonoBehaviour { // Use this for initialization void Start () { rigidbody.AddForce(Vector3.up * 10.0f,ForceMode.Impulse); } } PickSelect using UnityEngine; using System.Collections; public class PickSelect : MonoBehaviour { // Update is called once per frame void Update () { if(Input.GetMouseButton(0)) { Ray ray = Camer.. 2021. 5. 30.
유니티 게임 프로그래밍 10장 예제 구현 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.
유니티 게임 프로그래밍 9장 예제 구현 Log using UnityEngine; using System.Collections; public class Log : MonoBehaviour { public GUISkin skin; public int ScrollSize; private int index = 0; private Vector2 scrollPosition = Vector2.zero; private string[] logtext; public static Log logInstance; public bool ison = false; void Awake() { logInstance = this; DontDestroyOnLoad(transform.gameObject); } void Start () { if(ScrollSize == 0) { S.. 2021. 5. 30.
유니티 게임 프로그래밍 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.
728x90