资源简介
愤怒的小鸟unity3d版本,C#脚本编写,素材齐全,功能完整。

代码片段和文件信息
/* Copyright (C) 2011 by IGAMEMAKER.COM
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
using UnityEngine;
using System.Collections;
public class Camerascript : MonoBehaviour {
// Use this for initialization
public bool bDebug;
public Gameobject farBackground;
public Gameobject midBackground;
private Gameobject bgInstance;
private Gameobject mgInstance;
private Vector3 slingShotPosition;
private Vector3 furthestobjectivePosition;
private float time;
void Start () {
bDebug=false;
// Get some location information
//slingShotPosition = Gameobject.Find(“SlingShotStand“).transform.position;
slingShotPosition = gameobject.transform.position; // Use intital camera positioning to return to
// For now grab the furthest right of all of the objective objects
furthestobjectivePosition = Vector3.zero;
Gameobject[] gos;
gos = Gameobject.FindGameobjectsWithTag(“objective“);
foreach(Gameobject go in gos)
{
if (go.transform.position.x > furthestobjectivePosition.x)
{
furthestobjectivePosition = go.transform.position;
}
}
// Set initial position to furthest
float x = furthestobjectivePosition.x;
transform.position = new Vector3(x transform.position.y transform.position.z);
time = Time.time;
if (null!=farBackground)
{
bgInstance = Instantiate(farBackground new Vector3(x transform.position.y 100.0f) Quaternion.Euler(0 0 90)) as Gameobject;
bgInstance.transform.localScale = new Vector3(150.0f 150.0f 1.0f);
}
if (null!=midBackground)
{
mgInstance = Instantiate(midBackground GetMidBackgroundPosition(x) Quaternion.Euler(-90 0 0)) as Gameobject;
mgInstance.transform.localScale = new Vector3(50.0f 50.0f 50.0f);
}
}
Vector3 GetMidBackgroundPosition(float x)
{
// Scale to one third of the horizontal movement of the range from slingshot to end objective
float rx = furthestobjectivePosition.x - slingShotPosition.x;
float dx = x - slingShotPosition.x;
// Move 1/3rd the distance
return ne
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-20 13:03 .vs\
目录 0 2018-11-20 13:03 .vs\Project1120_1\
目录 0 2018-11-20 13:03 .vs\Project1120_1\v14\
文件 52736 2018-11-21 17:07 .vs\Project1120_1\v14\.suo
文件 5537 2018-11-20 12:58 Assembly-CSharp.csproj
目录 0 2018-11-20 12:58 Assets\
文件 192 2018-11-20 12:58 Assets\Audio.me
目录 0 2018-11-20 12:58 Assets\Audio\
文件 70432 2011-04-29 12:31 Assets\Audio\Boing.wav
文件 463 2018-11-20 12:58 Assets\Audio\Boing.wav.me
文件 30800 2011-04-29 12:31 Assets\Audio\GlassHit1.wav
文件 463 2018-11-20 12:58 Assets\Audio\GlassHit1.wav.me
文件 86544 2011-04-29 12:31 Assets\Audio\Impact-old1.wav
文件 463 2018-11-20 12:58 Assets\Audio\Impact-old1.wav.me
文件 50288 2011-04-29 12:31 Assets\Audio\Impact.wav
文件 463 2018-11-20 12:58 Assets\Audio\Impact.wav.me
文件 18546 2011-04-29 12:31 Assets\Audio\WoodHit1.wav
文件 463 2018-11-20 12:58 Assets\Audio\WoodHit1.wav.me
文件 75888 2011-04-29 12:31 Assets\Audio\Woohoo.wav
文件 463 2018-11-20 12:58 Assets\Audio\Woohoo.wav.me
文件 84184 2011-04-29 12:31 Assets\Audio\Yipee.wav
文件 463 2018-11-20 12:58 Assets\Audio\Yipee.wav.me
文件 192 2018-11-20 12:58 Assets\Fonts.me
目录 0 2018-11-20 12:58 Assets\Fonts\
文件 4227 2011-04-29 12:31 Assets\Fonts\OFL - Copyright.txt
文件 178 2018-11-20 12:58 Assets\Fonts\OFL - Copyright.txt.me
文件 17596 2011-04-29 12:31 Assets\Fonts\Sniglet_Regular.otf
文件 500 2018-11-20 12:58 Assets\Fonts\Sniglet_Regular.otf.me
文件 17596 2011-04-29 12:31 Assets\Fonts\Sniglet_Small.otf
文件 431 2018-11-20 12:58 Assets\Fonts\Sniglet_Small.otf.me
文件 192 2018-11-20 12:58 Assets\Global.me
............此处省略1063个文件信息
相关资源
- C# IP地址输入控件
- C#在一个窗口刷新更改另一个窗口控件
- C# TIP文件生成和拆解
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
评论
共有 条评论