当前位置:网站首页>NGUI,地图放大缩小
NGUI,地图放大缩小
2022-06-11 10:20:00 【ying1228475251】
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/*
*文件描述:
*创始人:
*创建时间:
*修改时间:
*版本:1.0
*/
public class Minimap2 : MonoBehaviour {
Camera minimapCamera;
UIButton btn, btn2;
void Start () {
minimapCamera = GameObject.Find("MinimapCamera").transform.GetComponent<Camera>();
btn = transform.GetChild(1).GetComponent<UIButton>();
btn2 = transform.GetChild(2).GetComponent<UIButton>();
btn.onClick.Add(new EventDelegate(this,"B"));
btn2.onClick.Add(new EventDelegate(this, "B2"));
}
void B() {
if (minimapCamera.fieldOfView >=23)
{
minimapCamera.fieldOfView -= 5;
}
}
void B2()
{
if (minimapCamera.fieldOfView <=43)
{
minimapCamera.fieldOfView += 5;
}
}
}
边栏推荐
猜你喜欢

TikTok在英国遭遇文化冲突,短期内众多员工离职

帝国CMS仿《游戏鸟》模板源码/92kaifa版大型手机游戏门户网站模板

Mouse click coordinate transformation generation

After four years of outsourcing, it was abandoned

Q1's revenue exceeded Wall Street's expectations, and the value of Zhiwen group is waiting to return

微信小程序之点餐系统附源码

鼠标点击坐标转换生成

Technology cloud report: privacy computing under the wave of Web3.0

Picture rule page turning

Circuit board made of real gold -- golden finger
随机推荐
宝塔面板备份与恢复数据
What are the functions and applications of Mogg test controller
What hydraulic oil is used for Denison hydraulic pump? What are the requirements
How much do you know about the functions and functions of Rexroth solenoid directional valve
C语言校园导游咨询系统
用真金做的电路板——金手指
Cisp-pte XSS Foundation
你对软件兼容性测试知道多少?如何选择软件兼容性测试机构?
Start jar
以银行异业合作为例,浅谈小程序生态的建设
远程监控项目离线日志说明书
mysql基础学习笔记03
What are the functions and features of EMG linear light emitter?
[Objective-C] differences between structs and classes
微信小程序之点餐系统附源码
MySQL基础篇常用约束总结下篇
Use of JMeter (simulating high concurrency)
Puppeter class of puppeter introduction
What are the differences between Parker pilot solenoid valve and direct acting solenoid valve?
DataGrip 2022,DataGrip 功能