资源简介

一款很火的小游戏flappybird的unity山寨版本。仅供学习之用,请勿商业化。具体代码实现原理请参考作者博文: http://blog.csdn.net/stalendp 作者: stalendp

资源截图

代码片段和文件信息

using UnityEngine;
using System.Collections;

public class bird : MonoBehaviour {
public Vector2 force = new Vector2(0 50);
public Transform trans;
public Vector3 initPos;
Rigidbody2D body;

// Use this for initialization
void Start () {
body = gameobject.GetComponent();
initPos = gameobject.transform.position;
}

// Update is called once per frame
void Update () {
if(Input.GetButtonDown(“Fire1“)){
body.AddForce(force);
}
}

public void reset() {
body.isKinematic = true;
gameobject.transform.position = initPos;
gameobject.transform.eulerAngles = Vector3.zero;
GetComponent().enabled = true;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-02-11 22:53  flappyBird\
     文件        6148  2014-02-11 22:50  flappyBird\.DS_Store
     目录           0  2014-02-11 22:53  __MACOSX\
     目录           0  2014-02-11 22:53  __MACOSX\flappyBird\
     文件          82  2014-02-11 22:50  __MACOSX\flappyBird\._.DS_Store
     文件        3353  2014-02-11 22:45  flappyBird\Assembly-CSharp-vs.csproj
     文件        3353  2014-02-11 22:45  flappyBird\Assembly-CSharp.csproj
     目录           0  2014-02-11 22:50  flappyBird\Assets\
     文件        6148  2014-02-11 22:50  flappyBird\Assets\.DS_Store
     目录           0  2014-02-11 22:53  __MACOSX\flappyBird\Assets\
     文件          82  2014-02-11 22:50  __MACOSX\flappyBird\Assets\._.DS_Store
     目录           0  2014-02-11 22:50  flappyBird\Assets\flappyBird\
     目录           0  2014-02-11 22:31  flappyBird\Assets\flappyBird\anims\
     文件        6048  2014-02-11 21:23  flappyBird\Assets\flappyBird\anims\bird.controller
     文件          95  2014-02-11 21:19  flappyBird\Assets\flappyBird\anims\bird.controller.meta
     目录           0  2014-02-11 22:53  __MACOSX\flappyBird\Assets\flappyBird\
     目录           0  2014-02-11 22:53  __MACOSX\flappyBird\Assets\flappyBird\anims\
     文件          82  2014-02-11 21:19  __MACOSX\flappyBird\Assets\flappyBird\anims\._bird.controller.meta
     文件        6056  2014-02-10 23:37  flappyBird\Assets\flappyBird\anims\bird01.controller
     文件          95  2014-02-10 21:48  flappyBird\Assets\flappyBird\anims\bird01.controller.meta
     文件          82  2014-02-10 21:48  __MACOSX\flappyBird\Assets\flappyBird\anims\._bird01.controller.meta
     文件       11888  2014-02-11 21:23  flappyBird\Assets\flappyBird\anims\birdIdle.anim
     文件          95  2014-02-11 21:19  flappyBird\Assets\flappyBird\anims\birdIdle.anim.meta
     文件          82  2014-02-11 21:19  __MACOSX\flappyBird\Assets\flappyBird\anims\._birdIdle.anim.meta
     文件       11488  2014-02-10 23:49  flappyBird\Assets\flappyBird\anims\birds.anim
     文件          95  2014-02-10 21:48  flappyBird\Assets\flappyBird\anims\birds.anim.meta
     文件          82  2014-02-10 21:48  __MACOSX\flappyBird\Assets\flappyBird\anims\._birds.anim.meta
     文件        7936  2014-02-11 21:45  flappyBird\Assets\flappyBird\anims\GameOver.controller
     文件          95  2014-02-11 21:25  flappyBird\Assets\flappyBird\anims\GameOver.controller.meta
     文件          82  2014-02-11 21:25  __MACOSX\flappyBird\Assets\flappyBird\anims\._GameOver.controller.meta
     文件       13572  2014-02-11 21:51  flappyBird\Assets\flappyBird\anims\gameOverAnim.anim
............此处省略403个文件信息

评论

共有 条评论