首页 > 其他分享 >unity签名

unity签名

时间:2023-02-15 11:58:04浏览次数:50  
标签:int double transform private unity 签名 time public

 

 

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

namespace LastZero.Utility
{
public class Painting : MonoBehaviour
{
public Color mColor = Color.black;//画笔颜色
//[HideInInspector]
public Texture brushTexture;//画笔
[HideInInspector]
public float brushScale = 0.1f;//画笔大小
[HideInInspector]
public bool isEraser = false;//是否使用橡皮擦
private RenderTexture texRender;//接收图的RenderTexture
public Material mat;//材质球
private RawImage rImage;//RawImage,自身
private RectTransform rTransform;//RectTransform

private Vector3 startPosition = Vector3.zero;
private Vector3 endPosition = Vector3.zero;

private Vector2 posOffset;
//
//
[SerializeField]
private Image _defaultColorImage;
#region 毛笔接口
public class tagFPOINT
{
public int x;
public int y;
public double time;
public double time2;
public double time3;
public tagFPOINT()
{
this.x = 0; this.y = 0; this.time = 0; this.time2 = 0; this.time3 = 0;
}
public tagFPOINT(int x, int y, double time, double time2, double time3)
{
this.x = x; this.y = y; this.time = time; this.time2 = time2; this.time3 = time3;
}
}

private List<tagFPOINT> n_list = new List<tagFPOINT>();
private System.Random r_guid;
//
private int pen_width = 10;
private int imgwidth = 40;//90;
private int imgheight = 5;//90;
private int i_mincount = 8;// 24;
private tagFPOINT oldpoint = null;
private double old_width;
private double i_endr = 0.0;
private double i_cwidth = 0.0;
private tagFPOINT nextpoint = null;
private double i_end = 0.0;
private int i_minwidth = 5;
private Color pen_color = Color.black;
private int i_time = 0;
private bool b_down = false;
#endregion

private void Start()
{
init_MyPen();
SetPainting();
posOffset.Set((Screen.width - rTransform.sizeDelta.x * transform.root.localScale.x) / 2 + transform.position.x - transform.root.position.x, (Screen.height - rTransform.sizeDelta.y * transform.root.localScale.y) / 2 + transform.position.y - transform.root.position.y);
}

void Update()
{/*
if (Input.GetMouseButton(0))
{
DragUpdate();
}
if (Input.GetMouseButtonUp(0))
{
DragEnd();
}*/
}

qq:77211022   微信:13762930029

 

标签:int,double,transform,private,unity,签名,time,public
From: https://www.cnblogs.com/huiyunsoft/p/17122296.html

相关文章

  • Unity shader算法收集之缩放uv
    缩放uv算法代码如下:1half2ScaleUVsByCenter(half2uv,floatscale)2{3float2center=float2(0.5,0.5);4return(uv-center)/scale+center;5......
  • 想要整个自签名SSL证书,Chrome却提醒我没有指定主题备用名称...
    错误码是NET::ERR_CERT_COMMON_NAME_INVALID解决方法:给IP签名#!/bin/bashIP="1.2.3.4"keytool\-genkey\-alias"${IP}"\-sigalgSHA512withRSA......
  • [Unity URP]原神 Shader渲染还原 Part1 面部阴影
    声明本文章的代码仅作为学习交流使用//面部阴影half3faceShadow;#ifFACESHADOW_ONfloat3Front=mul(unity_O......
  • unity 四元数旋转各元素值的计算方法
    //旋转轴Vector3axis=Vector3.up;//旋转弧度floatrad=50f*Mathf.Deg2Rad;Quaternionquaternion=newQuaternion();quaternion.x=Mathf.Sin(rad/2f)......
  • unity Android 可后台替换图片
    usingSystem.Collections;usingSystem.Collections.Generic;usingSystem.IO;usingUnityEngine;usingUnityEngine.Networking;usingUnityEngine.UI;usingUnit......
  • Unity 转小游戏
    填写appid和游戏资源位置在导出的项目里可以修改游戏资源位置两个目录minigame是小程序打开的目录webgl是要下载的的资源下载一个http服务器就有了和JS交互大部......
  • Unity导出web浏览器运行的WebGL操作
    前提:1.Unity2020.3的编辑器+项目需要再Unity编辑器执行不报错2.系统win103.浏览器使用  或  导出:1.下载WebGL支持        ......
  • unity 保持物体大小不变
    ///<summary>///在透视投影时,改变相机的fov或物体的位置,让物体保持在屏幕上看起来的大小一样的缩放值///</summary>///<returns></returns>p......
  • 安卓获取应用签名
    通过apk文件直接查看keytool-printcert-jarfileyyb.apk通过RSA文件查看将apk后缀名改为zip,解压进入META-INF文件夹,找到后缀名为RSA的文件通过命令keytool-prin......
  • Unity Shader 后处理(1):景深效果
    景深的产生原因:摄像机成像时,通过棱镜聚焦,光线通过棱镜打在传感器平面上。不同物距的成像结果也会不一样,只有焦平面上的物体上的任意一点,通过过棱镜后会在传感器平面上聚焦......