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; | |
using System.Collections; | |
using UnityEngine; | |
public class SwordSwing : MonoBehaviour | |
{ | |
private Transform swordTransform; | |
private Quaternion qr; | |
private Vector3 idealEuler; |
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; | |
[RequireComponent(typeof(CharacterController))] | |
public class FPSMovement3D : MonoBehaviour { | |
[SerializeField] private float playerWalkingSpeed = 5f; | |
[SerializeField] private float playerRunningSpeed = 15f; | |
[SerializeField] private float jumpStrength = 20f; | |
[SerializeField] private float verticalRotationLimit = 80f; | |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ManagerCamShake : MonoBehaviour | |
{ | |
public static ManagerCamShake instance; | |
[SerializeField] private float speed = 20f; | |
[SerializeField] private AnimationCurve damper = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.9f, .33f, -2f, -2f), new Keyframe(1f, 0f, -5.65f, -5.65f)); |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RatioEnforcer : MonoBehaviour { | |
[SerializeField] private float targetWidth = 256; | |
[SerializeField] private float targetHeight = 240; | |
// Use this for initialization |
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
// threshold for mask can be controlled using vertex color alpha (useful for spriteRenderers or particle systems) | |
// _MainTex: alpha of this texture is used as a mask | |
// _EmissionTex: usually rgb noise texture, adjust it's scaling if needed | |
// color remap and oscilation for each channel of emission can be modified in _EmStrobeBFALR, _EmStrobeBFALG, _EmStrobeBFALB | |
// Base: base amplitude of brightness oscilation | |
// Freq: frequency of oscilation | |
// Ampl: amplitude of oscilation | |
// L: how much _EmissionTex affects this color | |
Shader "StandardWMask" { |