Commit ffb49cf9 authored by hex's avatar hex

fix lighting and mouseParticle

parent 68130274
Pipeline #39657 failed
using System.Collections;
using UnityEngine;
using UnityEngine;
public class mouseParticle : MonoBehaviour
{
public Camera camera;
public ParticleSystem e1;
public ParticleSystem e2;
public Transform trans;
private float time = 0;
// Use this for initialization
void Start()
private void Start()
{
camera.depth = 99999;
}
float time = 0;
// Update is called once per frame
void Update()
private void Update()
{
Vector3 screenPoint = Input.mousePosition;
var screenPoint = Input.mousePosition;
screenPoint.z = 10;
trans.position = camera.ScreenToWorldPoint(screenPoint);
if (Input.GetMouseButton(0))
{
if (Input.GetMouseButtonDown(0))
{
time = 0;
e1.Play();
e2.Play();
}
time += Time.deltaTime;
if (time > 0.49)
{
time = 0.49f;
}
}
else
if (Input.GetMouseButtonUp(0))
{
e1.Stop();
e2.Stop();
}
}
}
\ No newline at end of file
......@@ -657,7 +657,7 @@ public class Program : MonoBehaviour
File.Move(newfile, oldfile);
}
// public GameObject mouseParticle;
public GameObject mouseParticle;
static int lastChargeTime = 0;
......@@ -1241,7 +1241,7 @@ public class Program : MonoBehaviour
Screen.autorotateToPortraitUpsideDown = false;
#endif
// 移动端不需要初始化鼠标特效
// mouseParticle = Instantiate(new_mouse);
mouseParticle = Instantiate(new_mouse);
instance = this;
Initialize();
go(
......
......@@ -152,7 +152,7 @@ public class Setting : WindowServant2D
public void onchangeMouse()
{
// Program.I().mouseParticle.SetActive(setting.mouseEffect.value);
Program.I().mouseParticle.SetActive(setting.mouseEffect.value);
}
//private int dontResizeTwice = 2;
......
using UnityEngine;
using System;
using System.Collections;
using System;
using UnityEngine;
public class fusion_tweener : MonoBehaviour {
public class fusion_tweener : MonoBehaviour
{
// ParticleEmitter[] emitters;
// ParticleAnimator[] animators;
ParticleSystem[] systems;
// Use this for initialization
void Start () {
void Start()
{
// emitters = GetComponentsInChildren<ParticleEmitter>();
// animators = GetComponentsInChildren<ParticleAnimator>();
systems = GetComponentsInChildren<ParticleSystem>();
......@@ -60,7 +62,7 @@ public class fusion_tweener : MonoBehaviour {
if (step == 1)
{
scaleFactor = 1 + Time.deltaTime*1.5f;
scaleFactor = 1 + Time.deltaTime * 1.5f;
}
if (step == 2)
{
......
......@@ -4984,7 +4984,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 126222}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.32103002, y: 0, z: 6.71785}
m_LocalPosition: {x: -0.27, y: 0, z: 5.65}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment