This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { _decorator, Color, Component, Renderable2D } from "cc"; | |
const { | |
ccclass, | |
property, | |
requireComponent, | |
disallowMultiple, | |
executeInEditMode, | |
} = _decorator; |
- Install VcXsrv
- Install WSL (Ubuntu)
Win
+R
, enterubuntu
- open vcxsrv (XLanuch)
- set display variable
export DISPLAY=127.0.0.1:0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace BlackFox | |
{ | |
using System; | |
using System.ComponentModel; | |
using System.Runtime.InteropServices; | |
using System.Security; | |
/// <summary> | |
/// As long as this object exists all mouse events created from a touch event for legacy support will be disabled. | |
/// Or, at least, that's the promise. But the system mouse-cursor still gets set to the position of the last |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
/// <summary> | |
/// Modified Gradient effect script from http://answers.unity3d.com/questions/1086415/gradient-text-in-unity-522-basevertexeffect-is-obs.html | |
/// -Uses Unity's Gradient class to define the color | |
/// -Offset is now limited to -1,1 | |
/// -Multiple color blend modes | |
/// | |
/// Remember that the colors are applied per-vertex so if you have multiple points on your gradient where the color changes and there aren't enough vertices, you won't see all of the colors. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class ShakeEffect : MonoBehaviour { | |
private float m_ShakeTime = 0.0f; | |
private float m_StartShakeTime = 0.0f; | |
public Vector3 ShakeRange = new Vector3 (0.2f, 0.05f, 0.1f); | |
[SerializeField] | |
private AnimationCurve m_ShakeCurve = new AnimationCurve(new Keyframe(0.0f, 1.0f), new Keyframe(1.0f, 1.0f)); |