ë©€‹°”Œë‍«¼ •± 개발과 …Œ¤Œ…

  • View
    210

  • Download
    7

Embed Size (px)

DESCRIPTION

## platforms * ios * android * unity ## logic * objective-c * java * csharp * javascript

Text of ë©€‹°”Œë‍«¼ •±...

  • 1. =====================- 2013 6 22 () 2 ~ 4- IT https://github.com/wookay

2. iOS https://developer.apple.com/technologies/ios/Xcode developer toolset https://developer.apple.com/technologies/tools/Android SDK http://developer.android.com/sdk/Android Studio http://developer.android.com/sdk/installing/studio.htmlUnity http://unity3d.com/unity/download/Node.js http://nodejs.org/download/ 3. 4. SDK, 5. 6. 7. 2 8. inputresultbutton 9. inputresultbutton 10. 11. 12. 13. 14. 15. https://github.com/wookay/multiply2/git clone git@github.com:wookay/multiply2.git 16. UI : ViewController_iPhone.xib : ViewController.h : ViewController.m 17. // platforms/ios/Sample/Sample/ViewController.h#import UIKit/UIKit.h@interface ViewController : UIViewController@property (strong, nonatomic) IBOutlet UITextField* input;@property (strong, nonatomic) IBOutlet UILabel* result;- (IBAction) touchedButton:(id)sender;@end 18. // platforms/ios/Sample/Sample/ViewController.m#import ViewController.h@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad {[super viewDidLoad];_input.placeholder = @ ;_input.keyboardType = UIKeyboardTypeNumberPad;_input.font = [UIFont fontWithName:@Helvetica size:26];[_input becomeFirstResponder];}- (IBAction) touchedButton:(id)sender {int num = _input.text.intValue;_result.text = [NSString stringWithFormat:@%d x 2 = %d, num, num * 2];NSLog(@input: %d, num);}@end 19. : layout/activity_main.xml : MainActivity.java 20. RelativeLayout xmlns:android=http://schemas.android.com/apk/res/androidxmlns:tools=http://schemas.android.com/toolsandroid:layout_width=match_parentandroid:layout_height=match_parentandroid:paddingLeft=@dimen/activity_horizontal_marginandroid:paddingRight=@dimen/activity_horizontal_marginandroid:paddingTop=@dimen/activity_vertical_marginandroid:paddingBottom=@dimen/activity_vertical_margintools:context=.MainActivityTextViewandroid:layout_width=wrap_contentandroid:layout_height=wrap_contentandroid:text=Resultandroid:layout_marginLeft=17dpandroid:id=@+id/resultandroid:textSize=20dpandroid:layout_below=@+id/inputandroid:layout_alignParentLeft=trueandroid:layout_marginTop=14dp/EditTextandroid:layout_width=wrap_contentandroid:layout_height=wrap_contentandroid:inputType=numberandroid:ems=10android:id=@+id/inputandroid:layout_marginTop=18dpandroid:layout_alignParentTop=trueandroid:layout_alignLeft=@+id/result/Buttonandroid:layout_width=wrap_contentandroid:layout_height=wrap_contentandroid:text=x 2android:id=@+id/buttonandroid:layout_alignBottom=@+id/inputandroid:layout_toRightOf=@+id/input//RelativeLayoutplatforms / android / SampleProject / Sample / src / main / res / layout / activity_main.xml 21. // platforms/android/SampleProject/Sample/src/main/java/com/factorcat/sample/MainActivity.javapackage com.factorcat.sample;import android.os.Bundle;import android.app.Activity;import android.view.Menu;import android.widget.EditText;import android.widget.Button;import android.widget.TextView;import android.view.View;import android.view.View.OnClickListener;import android.util.Log;public class MainActivity extends Activity {EditText input;Button button;TextView result;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);input = (EditText) this.findViewById(R.id.input);button = (Button) this.findViewById(R.id.button);result = (TextView) this.findViewById(R.id.result);button.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(final View v) {int num = 0;try {num = Integer.parseInt(input.getText().toString());} catch (NumberFormatException e) {}result.setText(String.format(%d x 2 = %d, num, num*2));Log.i([log], input:+ num);}});} 22. ios objective-c android java 23. // logic/objective-c/Test.m#import UnitTest.hint main (int argc, const char * argv[]) {NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];assert_equal( 1 , 1 );assert_equal( 3 , 1+2 );assert_equal( @a , @a );[pool release];return 0;}~/multiply2/logic/objective-c master$ makegcc -framework Foundation -o Test Test.m UnitTest.m~/multiply2/logic/objective-c master$ ./Testpassed: 1passed: 3passed: a 24. // logic/java/Test.javaclass Test {static void assert_equal(int expected, int got) {if (expected==got) {System.out.println(passed:+ expected);} else {System.out.println(Assertion failednExpected:+ expected +nGot:+ got);}}static void assert_equal(String expected, String got) {if (expected.equals(got)) {System.out.println(passed:+ expected);} else {System.out.println(Assertion failednExpected:+ expected +nGot:+ got);}}public static void main(String[] args) {assert_equal( 1 , 1 );assert_equal( 3 , 1+2 );assert_equal( a , a );}} ~/multiply2/logic/java master$ makejavac Test.java~/multiply2/logic/java master$ CLASSPATH=. java Testpassed: 1passed: 3passed: a 25. 26. C# : NewBehaviourScript.cs : NewBehaviourScript.js 27. // platforms/unity/CSharpSample/Assets/NewBehaviourScript.csusing UnityEngine;using System.Collections;using System;public class NewBehaviourScript : MonoBehaviour { private string input = ; private string result = Result; void OnGUI () {GUI.Label(new Rect(20,102,204,21), result);input = GUI.TextField(new Rect(20,50,200,30), input);if (GUI.Button(new Rect(236,43,67,43), x 2)) {int num = 0;try {num = Convert.ToInt32(input);} catch (FormatException) {}result = String.Format({0} x 2 = {1}, num, num*2);Debug.Log(String.Format(input: {0}, num));} }} 28. // platforms/unity/JavascriptSample/Assets/NewBehaviourScript.js#pragma strictvar input : String = ;var result : String = Result;function OnGUI () {GUI.Label(Rect(20,102,204,21), result);input = GUI.TextField(Rect(20,50,200,30), input);if (GUI.Button(Rect(236,43,67,43), x 2)) {var num = parseInt(input);result = String.Format({0} x 2 = {1}, num, num * 2 );Debug.Log(String.Format(input: {0}, num));}} 29. unity C# javascript 30. // logic/csharp/Test.csusing System;class Test {static void assert_equal(object expected, object got) {if (expected.Equals(got)) {Console.WriteLine(passed:+ expected);} else {Console.WriteLine(Assertion failednExpected:+ expected + nGot:+ got);}}static void Main() {assert_equal( 1 , 1 );assert_equal( 3 , 1+2 );assert_equal( a , a );}}~/multiply2/logic/csharp master$ makemcs Test.cs~/multiply2/logic/csharp master$ mono Test.exepassed: 1passed: 3passed: a 31. // logic/javascript/Test.jsfunction assert_equal(expected, got) {if (expected==got) {console.log(passed:+ expected);} else {console.log(Assertion failednExpected:+ expected + nGot:+ got);}}assert_equal( 1 , 1 );assert_equal( 3 , 1+2 );assert_equal( a , a );~/multiply2/logic/javascript master$ node Test.jspassed: 1passed: 3passed: a 32. ## In-App Purchase for Developers https://developer.apple.com/in-app-purchase/ : http://google.com/ads/admob/ : / https://tumblbug.com/ko/projects## SNS http://with.kakao.com/game http://developers.facebook.com## : http://trello.com : https://github.com http://slideshare.net http://linkedin.com## http://agebreak.iblug.com/ http://opentutorials.org 33. 34. : http://trello.com 35. : https://github.com 36. http://slideshare.net 37. http://agebreak.iblug.com/ 38. http://opentutorials.org 39. : / https://tumblbug.com/ko/projects 40. QA 41.