<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>開発者のブログ</title>
<link>https://ameblo.jp/iphoneyo/</link>
<atom:link href="https://rssblog.ameba.jp/iphoneyo/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>ブログの説明を入力します。</description>
<language>ja</language>
<item>
<title>keyinput</title>
<description>
<![CDATA[ //移動と削除（タイマーの方が動く）<br>//[self moveMap:dir];<br>moveStat = dir;<br>moveCnt = 32;<br>moveFlag = YES;<br><br>}<br><br>-(void)checkMapPoint:(int)dir {<br>CGPoint nextPoint;<br>if (dir == 0) {<br>nextPoint = CGPointMake(nowMapBasePoint.x, nowMapBasePoint.y-1);<br>}else if (dir == 1) {<br>nextPoint = CGPointMake(nowMapBasePoint.x, nowMapBasePoint.y+1);<br>}else if (dir == 2) {<br>nextPoint = CGPointMake(nowMapBasePoint.x-1, nowMapBasePoint.y);<br>}else if (dir == 3) {<br>nextPoint = CGPointMake(nowMapBasePoint.x+1, nowMapBasePoint.y);<br>}<br><br>NSArray *array = [mapDataArray objectAtIndex:nextPoint.y+heroHoseiPoint.y];<br>MapPartsData *data = [array objectAtIndex:nextPoint.x+heroHoseiPoint.x];<br><br>if (data.imgNo == 1) {<br>keyFlag = NO;<br>}else {<br>nowMapBasePoint = nextPoint;<br>[self mapChangeImg:dir];<br>}<br>}<br><br><br>-(void)gameProcess:(NSTimer *)timer {<br>//キー入力<br>if (moveFlag) {<br>moveCnt -= 2;<br><br>if (moveStat == STAT_MOVE_UP) {<br>for (NSMutableArray *array in mapImgViewArray) {<br>for (UIImageView *imgView in array) {<br>imgView.frame = CGRectMake(imgView.frame.origin.x, imgView.frame.origin.y+2, 32, 32);<br>}<br>}<br>}else if (moveStat == STAT_MOVE_DOWN) {<br>for (NSMutableArray *array in mapImgViewArray) {<br>for (UIImageView *imgView in array) {<br>imgView.frame = CGRectMake(imgView.frame.origin.x, imgView.frame.origin.y-2, 32, 32);<br>}<br>}<br>}else if (moveStat == STAT_MOVE_LEFT) {<br>for (NSMutableArray *array in mapImgViewArray) {<br>for (UIImageView *imgView in array) {<br>imgView.frame = CGRectMake(imgView.frame.origin.x+2, imgView.frame.origin.y, 32, 32);<br>}<br>}<br>}else if (moveStat == STAT_MOVE_RIGHT) {<br>for (NSMutableArray *array in mapImgViewArray) {<br>for (UIImageView *imgView in array) {<br>imgView.frame = CGRectMake(imgView.frame.origin.x-2, imgView.frame.origin.y, 32, 32);<br>}<br>}<br>}<br><br>if (moveCnt &lt;= 0) {<br>//削除<br>if (moveStat == STAT_MOVE_UP) {<br>NSMutableArray *chip_x_array = [mapImgViewArray lastObject];<br>for (UIImageView *imgView in chip_x_array) {<br>[imgView removeFromSuperview];<br>}<br>[mapImgViewArray removeLastObject];<br>}else if (moveStat == STAT_MOVE_DOWN) {<br>NSMutableArray *chip_x_array = [mapImgViewArray objectAtIndex:0];<br>for (UIImageView *imgView in chip_x_array) {<br>[imgView removeFromSuperview];<br>}<br>[mapImgViewArray removeObjectAtIndex:0];<br>}else if (moveStat == STAT_MOVE_LEFT) {<br>for (int i = 0; i &lt; mapchip_y; i++) {<br>NSMutableArray *chip_x_array = [mapImgViewArray objectAtIndex:i];<br><br>UIImageView *imgView = [chip_x_array lastObject];<br>[imgView removeFromSuperview];<br><br>[chip_x_array removeLastObject];<br>}<br>}else if (moveStat == STAT_MOVE_RIGHT) {<br>for (int i = 0; i &lt; mapchip_y; i++) {<br>NSMutableArray *chip_x_array = [mapImgViewArray objectAtIndex:i];<br><br>UIImageView *imgView = [chip_x_array objectAtIndex:0];<br>[imgView removeFromSuperview];<br><br>[chip_x_array removeObjectAtIndex:0];<br>}<br>}<br><br>moveFlag = NO;<br>keyFlag = NO;<br>}<br>}<br><br>float abs_input_x = fabs(key_input_point.x);<br>float abs_input_y = fabs(key_input_point.y);<br>if (abs_input_x - abs_input_y != 0) {<br>if (!keyFlag) {<br>keyFlag = YES;<br>if (abs_input_x &gt; abs_input_y) {<br>//左右<br>if (key_input_point.x &gt; 0) {<br>[self checkMapPoint:STAT_MOVE_RIGHT];<br>}else {<br>[self checkMapPoint:STAT_MOVE_LEFT];<br>}<br><br>}else {<br>//上下<br>if (key_input_point.y &gt; 0) {<br>[self checkMapPoint:STAT_MOVE_DOWN];<br>}else {<br>[self checkMapPoint:STAT_MOVE_UP];<br>}<br>}<br>}<br>}<br><br>    <br>    //時間経過<br>    conma ++;<br>    if (conma &gt;= 60) {<br>        conma = 0;<br>        second ++;<br>    }<br>}<br><br><br>- (void)panAction : (UIPanGestureRecognizer *)sender {<br>    <br>    if (sender.state == UIGestureRecognizerStateBegan) {<br>CGPoint location = [sender locationInView:self.view];<br><br>if (keyImgView == nil) {<br>NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"key" ofType:@"png"];<br>UIImage *image = [[UIImage alloc] initWithContentsOfFile:imagePath];<br>keyImgView = [[UIImageView alloc] initWithImage:image];<br>[image release];<br>keyImgView.center = location;<br>[self.view addSubview:keyImgView];<br>[keyImgView release];<br>}<br><br><br>        // ドラッグで移動した距離を取得する<br>        key_input_point = [sender translationInView:self.view];<br>        <br>    }else if (sender.state == UIGestureRecognizerStateEnded) {<br>if (keyImgView != nil) {<br>[keyImgView removeFromSuperview];<br>keyImgView = nil;<br>}<br><br>        key_input_point = CGPointMake(0, 0);<br>        <br>    }else {<br><br>        // ドラッグで移動した距離を取得する<br>        key_input_point = [sender translationInView:self.view];<br>        <br>//NSLog(@"x_%f",beforeP.x);<br>//NSLog(@"y_%f",beforeP.y);<br>        <br>        <br>        // ドラッグで移動した距離を初期化する<br>        // これを行わないと、[sender translationInView:]が返す距離は、ドラッグが始まってからの蓄積値となるため、<br>        // 今回のようなドラッグに合わせてImageを動かしたい場合には、蓄積値をゼロにする<br>        //[sender setTranslation:CGPointZero inView:self.view];<br>        <br>    }<br>}<br>
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11597850769.html</link>
<pubDate>Thu, 22 Aug 2013 22:59:06 +0900</pubDate>
</item>
<item>
<title>map</title>
<description>
<![CDATA[ #define map_x 64<br>#define map_y 36<br><br>#define limit_x 3<br>#define limit_y 3<br><br>@implementation ViewController<br><br>-(void)makeMap:(int)bx By:(int)by Width:(int)width Height:(int)height Count:(int)count {<br>    int size1;<br>    int size2;<br>    <br>    if (count+2<arc4random()%5 || (width < limit_x*2+1 && height limit_y*2+1)) {<br />        return;<br>    }<br>    <br>    int div = arc4random() % 2;<br>    if (width &lt; limit_x*2+1) {<br>        div = 1;<br>    }<br>    if (height &lt; limit_y*2+1) {<br>        div = 0;<br>    }<br>    <br>    if (div == 0) {<br>        size1 = limit_x + arc4random() % (width-limit_x*2);<br>        size2 = width-1-size1;<br>        <br>        for (NSMutableArray *array in mapArray) {<br>            [array replaceObjectAtIndex:bx+size1 withObject:@"1"];<br>        }<br>        <br>        [self makeMap:bx By:by Width:size1 Height:height Count:count-1];<br>        [self makeMap:bx+size1+1 By:by Width:size2 Height:height Count:count-1];<br>        <br>//        int hole = arc4random() % height;<br>        <br>        <br>    }else {<br>        size1 = limit_y + arc4random() % (height-limit_y*2);<br>        size2 = height-1-size1;<br>        <br>        NSMutableArray *array = [mapArray objectAtIndex:by+size1];<br>        for (int i = 0; i &lt; array.count; i++) {<br>            [array replaceObjectAtIndex:i withObject:@"1"];<br>        }<br>        [self makeMap:bx By:by Width:width Height:size1 Count:count-1];<br>        [self makeMap:bx By:by+size1+1 Width:width Height:size2 Count:count-1];<br>    }<br>}<br><br>- (void)viewDidLoad<br>{<br>    [super viewDidLoad];<br>// Do any additional setup after loading the view, typically from a nib.<br>    <br>    //マップ初期作成<br>    mapArray = [[NSMutableArray alloc] init];<br>    for (int i = 0; i &lt; map_y; i++) {<br>        NSMutableArray *array = [NSMutableArray array];<br>        for (int j = 0; j &lt; map_x; j++) {<br>            if (i == 0 || j == 0 || i == map_y-1 || j == map_x-1) {<br>                [array addObject:@"1"];<br>            }else {<br>                [array addObject:@"0"];<br>            }<br>        }<br>        [mapArray addObject:array];<br>    }<br>    <br>    //自動生成<br>    [self makeMap:1 By:1 Width:map_x-2 Height:map_y-2 Count:7];<br>    <br>    //マップ表示<br>    int y_cnt = 0;<br>    for (NSMutableArray *array in mapArray) {<br>        int x_cnt = 0;<br>        for (NSString *str in array) {<br>            UIView *view = [[UIView alloc] initWithFrame:CGRectMake(x_cnt*5, y_cnt*5, 5, 5)];<br>            if ([str isEqualToString:@"0"]) {<br>                view.backgroundColor = [UIColor greenColor];<br>            }else {<br>                view.backgroundColor = [UIColor lightGrayColor];<br>            }<br>            [self.view addSubview:view];<br>            [view release];<br>            <br>            x_cnt ++;<br>        }<br>        y_cnt ++;<br>    }<br>    <br>}
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11593080233.html</link>
<pubDate>Thu, 15 Aug 2013 15:28:05 +0900</pubDate>
</item>
<item>
<title>transformの回転でframeの値が変わることについて</title>
<description>
<![CDATA[ http://laboyukai.blogspot.jp/2012/12/uiviewtransform.html
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11534154618.html</link>
<pubDate>Mon, 20 May 2013 12:32:40 +0900</pubDate>
</item>
<item>
<title>マイクレベル感知</title>
<description>
<![CDATA[ http://d.hatena.ne.jp/h_mori/20110806/1312603115
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11534133546.html</link>
<pubDate>Mon, 20 May 2013 11:58:03 +0900</pubDate>
</item>
<item>
<title>filemanager</title>
<description>
<![CDATA[ http://blog.suf.la/2011/01/3.html<br><br>・StoryViewController.m<br><br>//Documentsディレクトリ取得<br>    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);<br>    NSString* docDir = [paths objectAtIndex:0];<br>NSString *dirname = [docDir stringByAppendingPathComponent:@"myDir"];<br><br>NSFileManager* fileManager = [NSFileManager defaultManager];<br>[fileManager removeItemAtPath:dirname error:nil];<br><br>if(![fileManager fileExistsAtPath:dirname])<br>[fileManager createDirectoryAtPath:dirname<br>   withIntermediateDirectories:YES<br>attributes:nil<br> error:nil];<br><br>    //Documentsのディレクトリの中身確認<br>    NSArray *array = [fileManager subpathsAtPath:dirname];<br>    NSLog(@"あああ＿%@",[array description]);<br><br><br>-(void)deleteRecordFile {<br>    if (recordTargetImgView.recordFileName != nil) {<br>        <br>        //Documentsディレクトリ取得<br>        NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);<br>        NSString* docDir = [paths objectAtIndex:0];<br>NSString *dirname = [docDir stringByAppendingPathComponent:@"myDir"];<br>        <br>        //Documentsのディレクトリの中身確認<br>        NSFileManager* fileManager = [NSFileManager defaultManager];<br>        NSArray *array = [fileManager subpathsAtPath:dirname];<br>        NSLog(@"%@",[array description]);<br>        <br>        //NSFileManager* fileManager = [NSFileManager defaultManager];<br>        [fileManager removeItemAtPath:[NSString stringWithFormat:@"%@/%@.caf", dirname,recordTargetImgView.recordFileName] error:nil];<br>        <br>        //Documentsのディレクトリの中身確認<br>        NSArray *array2 = [fileManager subpathsAtPath:dirname];<br>        NSLog(@"%@",[array2 description]);<br>        <br>        <br>        //録音ファイル名も初期化する<br>        [recordTargetImgView.recordFileName release];<br>        recordTargetImgView.recordFileName = nil;<br>    }<br>}<br><br>・MyAudioPlayManager<br><br>-(void)playRecord:(NSString *)fileName {<br>    // 録音ファイルパス<br>    NSArray *filePaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,<br>                                                             NSUserDomainMask,YES);<br>    NSString *documentDir = [filePaths objectAtIndex:0];<br>NSString *dirname = [documentDir stringByAppendingPathComponent:@"myDir"];<br>    NSString *str = [NSString stringWithFormat:@"%@.caf",fileName];<br>    NSString *path = [dirname stringByAppendingPathComponent:str];<br>    NSURL *recordingURL = [NSURL fileURLWithPath:path];<br>    <br>    if (recordingURL != nil) {<br>        AVAudioPlayer *seAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:recordingURL error:nil];<br>        <br>        // 再生終了時に自クラス内のaudioPlayerDidFinishPlayingを呼出す<br>        seAudio.delegate = self;<br>        <br>        //繰り返し再生しない<br>        seAudio.numberOfLoops = 0;<br>        <br>        //BGMの音量設定（BGMOFFなら音量を０に）<br>        seAudio.volume = seVolume;<br>        <br>        //SE再生<br>        if (seAudio != nil) {<br>            [seAudio play];<br>NSLog(@"すたーと");<br>        }<br>    }<br>}<br><br>・AudioRecorderManager<br><br> // 録音ファイルパス<br>    NSArray *filePaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,<br>                                                             NSUserDomainMask,YES);<br>    NSString *documentDir = [filePaths objectAtIndex:0];<br>NSString *dirname = [documentDir stringByAppendingPathComponent:@"myDir"];<br>    NSString *str = [NSString stringWithFormat:@"%@.caf",recordName];<br>    NSString *path = [dirname stringByAppendingPathComponent:str];<br>    NSURL *recordingURL = [NSURL fileURLWithPath:path];<br>    <br>    // 録音の設定 AVNumberOfChannelsKey チャンネル数1
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11533902652.html</link>
<pubDate>Mon, 20 May 2013 00:04:21 +0900</pubDate>
</item>
<item>
<title>stamp01</title>
<description>
<![CDATA[ -(void)actionProcess:(float)backAngle {<br>    StoryViewController *svc = (StoryViewController *)myOwner;<br>    <br>    //アクション<br>    CharaActionData *data = [charaActionDataArrayManager getActionData:backAngle];<br>    if (data != nil) {<br>        switch (data.actionType) {<br>            case ACTION_TYPE_ANGLE:<br>                endAngle = data.endPosition;<br>                angleSpeed = data.actionSpeed;<br>                break;<br>            case ACTION_TYPE_Y:<br>                <br>                break;<br>            case ACTION_TYPE_DEAD:<br>                [self removeFromSuperview];<br>                [svc removeImgCharaArray:self];<br>                break;<br>            default:<br>                break;<br>        }<br>    }<br>    <br>    if (nowAngle &lt; endAngle) {<br>        nowAngle += svc.angleValue*angleSpeed;<br>        <br>        float mx = (BACK_RADIUS + nowHeight) * -cos(M_PI * (OBJ_APPEAR_ANGLE + nowAngle) / 180.0)+svc.backView.center.x;<br>        float my = (BACK_RADIUS + nowHeight) * -sin(M_PI * (OBJ_APPEAR_ANGLE + nowAngle) / 180.0)+svc.backView.center.y;<br>        <br>        self.center = CGPointMake(mx, my-self.frame.size.height/2);<br>    }else if (nowAngle &gt; endAngle) {<br>        nowAngle -= svc.angleValue*angleSpeed;<br>        <br>        float mx = (BACK_RADIUS + nowHeight) * -cos(M_PI * (OBJ_APPEAR_ANGLE + nowAngle) / 180.0)+svc.backView.center.x;<br>        float my = (BACK_RADIUS + nowHeight) * -sin(M_PI * (OBJ_APPEAR_ANGLE + nowAngle) / 180.0)+svc.backView.center.y;<br>        <br>        self.center = CGPointMake(mx, my-self.frame.size.height/2);<br>    }<br>    <br>}<br><br><br><br>- (void)panAction:(UIPanGestureRecognizer *)sender {<br>    <br>    if (sender.state == UIGestureRecognizerStateBegan) {<br>        <br>        <br>    }else if (sender.state == UIGestureRecognizerStateEnded) {<br>        <br>        <br>    }else {<br>        // ドラッグで移動した距離を取得する<br>        CGPoint beforeP = [sender translationInView:self.view];<br>        <br>int move = beforeP.x;<br>        float movef = 0.0f;<br><br>if (move &lt; 0) {<br>if (move &gt; -2) {<br>movef = -0.25f;<br>}else if (move &gt; -4 &amp;&amp; move &lt;= -2) {<br>movef = -0.5f;<br>}else if (move &gt; -6 &amp;&amp; move &lt;= -4) {<br>movef = -0.75f;<br>}else if (move &lt;= -6) {<br>movef = -1.0f;<br>}<br>}else {<br>if (move &lt; 2) {<br>movef = 0.25f;<br>}else if (move &gt;= 2 &amp;&amp; move &lt; 4) {<br>movef = 0.5f;<br>}else if (move &gt;= 4 &amp;&amp; move &lt; 6) {<br>movef = 0.75f;<br>}else if (move &gt;= 6) {<br>movef = 1.0f;<br>}<br>}<br><br>NSLog(@"%f",movef);<br>        backAngle += movef;<br>//        NSLog(@"%f",backAngle);<br>        if (backAngle &lt; 0) {<br>            backAngle = 360;<br>        }else if (backAngle &gt; 360) {<br>            backAngle = 0;<br>        }<br>        <br>        backView.transform = CGAffineTransformMakeRotation(M_PI * backAngle / 180.0);<br>        <br>        // ドラッグで移動した距離を初期化する<br>        // これを行わないと、[sender translationInView:]が返す距離は、ドラッグが始まってからの蓄積値となるため、<br>        // 今回のようなドラッグに合わせてImageを動かしたい場合には、蓄積値をゼロにする<br>        [sender setTranslation:CGPointZero inView:self.view];<br>    }<br>}<br>
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11525457285.html</link>
<pubDate>Mon, 06 May 2013 22:55:21 +0900</pubDate>
</item>
<item>
<title>一時停止</title>
<description>
<![CDATA[ #import <quartzcore alayer.h><br><br>@interface CALayer (nnCALayer)<br><br>-(void)pauseAnimation:(BOOL)aPause;<br><br>@end<br><br><br><br>#import "nnCALayer.h"<br><br>@implementation CALayer (nnCALayer)<br><br>-(void)pauseAnimation:(BOOL)aPause<br>{<br>    if(aPause)<br>    {<br>        CFTimeInterval pausedTime = [self convertTime:CACurrentMediaTime() fromLayer:nil];<br>        self.speed = 0.0;<br>        self.timeOffset = pausedTime;<br>    }<br>    else<br>    {<br>        CFTimeInterval pausedTime = [self timeOffset];<br>        self.speed = 1.0;<br>        self.timeOffset = 0.0;<br>        self.beginTime = 0.0;<br>        CFTimeInterval timeSincePause = [self convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime;<br>        self.beginTime = timeSincePause;<br>    }<br>}<br><br>@end<br><br><br>BOOL pause;     // YES:一時停止 / NO:再開<br>[self.layer pauseAnimation:pause];</quartzcore>
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11493558669.html</link>
<pubDate>Tue, 19 Mar 2013 11:17:17 +0900</pubDate>
</item>
<item>
<title>円周</title>
<description>
<![CDATA[ CGPoint leftPosition = CGPointMake(baseLeftEyePosition.x+self.frame.origin.x, baseLeftEyePosition.y+self.frame.origin.y);<br>    CGPoint rightPosition = CGPointMake(baseRightEyePosition.x+self.frame.origin.x, baseRightEyePosition.y+self.frame.origin.y);<br><br><br>    //目の座標とアイテム座標から角度を求める<br>    float ldx = point.x-leftPosition.x;<br>    float ldy = point.y-leftPosition.y;<br>float rdx = point.x-rightPosition.x;<br>    float rdy = point.y-rightPosition.y;<br><br>    float l_angle = atan2f(ldy,ldx);<br>float r_angle = atan2f(rdy, rdx);<br>    <br>//    NSLog(@"angle_%f",angle);<br>    <br>    float lx = 5 * cos(l_angle) + baseLeftEyePosition.x;<br>    float ly = 5 * sin(l_angle) + baseLeftEyePosition.y;<br>float rx = 5 * cos(r_angle) + baseRightEyePosition.x;<br>    float ry = 5 * sin(r_angle) + baseRightEyePosition.y;<br><br>    leftEyePosition = CGPointMake(lx, ly);<br>    rightEyePosition = CGPointMake(rx, ry);
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11492524913.html</link>
<pubDate>Sun, 17 Mar 2013 21:35:08 +0900</pubDate>
</item>
<item>
<title>C#2</title>
<description>
<![CDATA[ public GameObject GET_EFFECT;　ゲームオブジェクトにパーティクルをぶらさげたプレハブ<br><br>Object geteffect = Instantiate(GET_EFFECT,transform.position,Quaternion.identity);<br>Destroy(geteffect,1.0f);
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11484239823.html</link>
<pubDate>Tue, 05 Mar 2013 23:20:42 +0900</pubDate>
</item>
<item>
<title>c#1</title>
<description>
<![CDATA[ <mydata><br><br>using UnityEngine;<br>using System.Collections;<br><br>public class mydata {<br><br>public int num1 {get; set;} <br>public int num2 {get; set;} <br>public string str1 { get; set; }<br>public string str2 { get; set; }<br><br>// Use this for initialization<br>void initMydata () {<br>num1 = 1;<br>num2 = 2;<br>str1 = null;<br>str2 = null;<br>}<br>}<br><br><br>&lt;ドラッグ&gt;<br><br><br>using UnityEngine;<br>using System.Collections;<br><br>public class objTouch : MonoBehaviour {<br><br>// Use this for initialization<br>void Start () {<br><br>}<br><br>// Update is called once per frame<br>void Update () {<br><br>}<br><br>private Vector3 screenPoint;<br>    private Vector3 offset;<br><br>void OnMouseDown() {<br>        this.screenPoint = Camera.main.WorldToScreenPoint(transform.position);<br>        this.offset = transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z));<br>}<br><br><br>    void OnMouseDrag() {<br>        Vector3 currentScreenPoint = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z);<br>        Vector3 currentPosition = Camera.main.ScreenToWorldPoint(currentScreenPoint) + this.offset;<br>        transform.position = currentPosition;<br>    }<br>}<br><br><br><appdelegate><br><br><br>using UnityEngine;<br>using System.Collections;<br><br>public class AppDelegate : MonoBehaviour {<br><br>// Use this for initialization<br>void Start () {<br>ArrayList list = new ArrayList();<br><br>for (int i = 0; i &lt; 5 ;i++) {<br>mydata data = new mydata();<br>data.num1 = i;<br>data.num2 = i+1;<br>data.str1 = i.ToString();<br>data.str2 = (i+1).ToString();<br><br>list.Add(data);<br>}<br><br>mydata my = (mydata)list[4];<br><br>print(my.num1);<br>}<br><br>// Update is called once per frame<br>void Update () {<br><br>}<br><br>void Awake () {<br><br>DontDestroyOnLoad ( this );<br>}<br>}<br></appdelegate></mydata>
]]>
</description>
<link>https://ameblo.jp/iphoneyo/entry-11477788886.html</link>
<pubDate>Sun, 24 Feb 2013 22:10:04 +0900</pubDate>
</item>
</channel>
</rss>
