Skip to content

Instantly share code, notes, and snippets.

@echo off
echo ** setting runtime variable
REM _protoSrc 是你的proto文件目录的位置
set _protoSrc=D:\project_zero\Tools\Protobuf
REM protoExe 是用于从proto生成java的protoc.exe程序的位置
set protoExe=D:\project_zero\Tools\Protobuf\protoc.exe
REM protoNet
set protoNet=D:\project_zero\Tools\Protobuf\ProtoGen.exe
REM java_out_file 存放生成的Java文件目录的位置
set java_out_file=D:\project_zero\Tools\Protobuf\Net
var dist : Number = Vector3D.distance( planeMesh.position , awayView.camera.position );
var fieldOfView : Number = (360 / Math.PI) * Math.atan(awayView.view.height / (2 * dist));
lens.fieldOfView = fieldOfView;// lens is a PerspectiveLens
public static function pixelPerfectCameraValue(camera:Camera3D,h:Number ):Number {
var h:Number = h;
var fovy:Number = (camera.lens as PerspectiveLens).fieldOfView*Math.PI/180;
return -(h/2) / Math.tan(fovy/2);
}
var dllAss = Assembly.Load(dll);
var testCase = dllAss.GetType("HotFix_Project.TestSignals");
Debug.Log("现在再来尝试创建一个实例:"+ testCase);
var testObj = dllAss.CreateInstance("HotFix_Project.TestSignals");
var method = testCase.GetMethod("RunTest", BindingFlags.Instance | BindingFlags.Public);
method.Invoke(testObj, new object[] { gameObject });
Signals.Get<KeyValueSignal>().Dispatch("101", 1);
///This sample script adds shaking movements to the humanoid bone.
///but could be used for other rig with a bit of modification.
///Useful when we want to a certain part of the enemy, as seen in most games with huge boss... :P
using UnityEngine;
public class shakebone : MonoBehaviour {
Animator animator;
public HumanBodyBones[] bones;