using UnityEngine;

using System.Collections;


public class ExPrintChar : MonoBehaviour {

// Use this for initialization

void Start () {

PrintChar ("A", 4, 3);

}

/*

void PrintChar(string ch, int x, int y){

string text;

for(int i = 0; i < x; i++){

text = "";

for(int j = 0; j < y; j++){

text = text + ch;

}

print (text);

}

}

*/

void PrintChar(string ch, int x, int y){

PrintLine ("-", 0, y + 2, "-");

for(int i = 0; i < x; i++){

PrintLine(ch, 1, y, "|");

}

PrintLine ("-", 0, y + 2 , "-");

}

void PrintLine(string ch, int pos, int y, string ch2){

string t = "";

for(int j = 0; j < pos; j++){

t = t + ch2;

}

for(int j = 0; j < y; j++){

t = t + ch;

}

print (t);

}

// Update is called once per frame

void Update () {

}

}



'Computer Language > 유니티' 카테고리의 다른 글

.콤마찍기  (0) 2014.04.14
exp  (0) 2014.04.11
zzz  (0) 2014.04.11
복리  (0) 2014.04.08
단리  (0) 2014.04.08

+ Recent posts