小编整理的那些DEMO

using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class CameraFollow : MonoBehaviour {


[SerializeField]
Transform x,zoom,container,player;
void LateUpdate(){
transform.position = player.position;
zoom.LookAt (player);
float Con=Input.GetAxis ("Mouse ScrollWheel");
container.Translate (Vector3.forward*Con*1f);
Vector3 v = container.localPosition;
v.z = Mathf.Clamp (v.z,-7,-5);
container.localPosition = v;
if(Input.GetMouseButton(1)){
           
float cameraX=Input.GetAxis("Mouse Y");
x.Rotate(Vector3.right*cameraX*1f);
Vector3 v1=x.eulerAngles;
if(v1.x>60&&v1.x<180){
v1.x=60;
}else if(v1.x>180&&v1.x<360){
v1.x=0;
}
x.eulerAngles=v1;


float cameraY=Input.GetAxis("Mouse X");
transform.Rotate(Vector3.up*cameraY*1f);
}
}

}



using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class Load : MonoBehaviour {


public Slider slider;
public Text text;
// Use this for initialization
void Start () {
StartCoroutine (load());
}
IEnumerator load(){
AsyncOperation operation = SceneManager.LoadSceneAsync ("MainGame");
operation.allowSceneActivation = false;


float currentprogress = 0f;
float totaoprogress = 100f;
while(currentprogress<=totaoprogress){
currentprogress+=1;
text.text="当前加载"+currentprogress.ToString()+"%";


slider.value=currentprogress;
yield return null;
}
operation.allowSceneActivation = true;
}

}



using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class PetFollow : MonoBehaviour {
[SerializeField]
Transform player;
float dis;
Animator ani;
// Use this for initialization
void Start () {
ani=GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
dis = Vector3.Distance (transform.position,player.position);
if (dis >= 1.5) {
transform.LookAt (player.transform);
transform.Translate (Vector3.forward * 2f * Time.deltaTime);
ani.SetBool ("Run", true);
} else {
ani.SetBool("Run",false);
}
}

}



using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class Rayx : MonoBehaviour {


RaycastHit hit;
[SerializeField]
Transform player;
Vector3 point;
// Update is called once per frame
void Update () {
if(Input.GetMouseButtonDown(0)){
Ray ray=Camera.main.ScreenPointToRay(Input.mousePosition);
if(Physics.Raycast(ray,out hit)){
point=hit.point;
}
}
player.LookAt (point);
player.position = Vector3.MoveTowards (player.position,point,50f*Time.deltaTime);
}
}

【顶级EI完美复现】电力系统碳排放流的计算方法【IEEE 14节点】(Matlab代码实现)内容概要:本文介绍了名为《【顶级EI完美复现】电力系统碳排放流的计算方法【IEEE 14节点】(Matlab代码实现)》的技术文档,核心内容是基于IEEE 14节点电力系统模型,利用Matlab实现碳排放流的精确计算方法。该方法通过建立电力系统中各节点的功率流动与碳排放之间的映射关系,实现对电能传输过程中碳足迹的追踪与量化分析,属于电力系统低碳调度与碳流管领域的关键技术。文中强调“顶级EI完美复现”,表明其算法和仿真结果具有较高的学术严谨性和可重复性,适用于科研验证与教学演示。; 适合人群:电力系统、能源与动力工程、电气工程及其自动化等相关专业的研究生、科研人员以及从事电力系统低碳化、碳排放核算工作的技术人员。; 使用场景及目标:①用于电力系统碳排放流论的学习与仿真验证;②支撑含新能源接入的电力系统低碳调度、碳交易、绿色电力溯源等课题的研究;③为撰写高水平学术论文(如EI/SCI期刊)提供可靠的代码基础和技术参考。; 阅读建议:读者应具备电力系统分析、Matlab程的基础知识,建议结合电力系统潮流计算、节点导纳矩阵等前置知识进行学习,并通过调整系统参数和运行方式,深入解碳排放流的分布规律与影响因素。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值