This file contains hidden or 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; | |
namespace SFMeshDeformer.Demo | |
{ | |
public class BallThrow : MonoBehaviour | |
{ | |
[SerializeField] private Rigidbody _ballPrefab; | |
[SerializeField] private float _throwSpeed = 30f; | |
void Update() |
This file contains hidden or 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
{ | |
"m_SGVersion": 3, | |
"m_Type": "UnityEditor.ShaderGraph.GraphData", | |
"m_ObjectId": "5c145d3ada4f40ea93038af752306c50", | |
"m_Properties": [ | |
{ | |
"m_Id": "729b6309691e494ca5acf0f0c5c34cf6" | |
}, | |
{ | |
"m_Id": "c993aca6d4e8473eb4d1795495527359" |
This file contains hidden or 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 UnityEngine; | |
public static class RandomExtension | |
{ | |
public static int ProceedValue(float random, RandomData[] data) | |
{ | |
var cumulativeSumArray = new float[data.Length]; | |
cumulativeSumArray[0] = data[0].chance; | |
for (int i = 1; i < cumulativeSumArray.Length; ++i) |
This file contains hidden or 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 WeaponSway : MonoBehaviour | |
{ | |
[SerializeField] private Transform weaponTransform; | |
[Header("Sway Properties")] | |
[SerializeField] private float swaySmooth = 8f; | |
[SerializeField] private float swayDamp = 2f; | |
[SerializeField] private float posToRotAmount = 1f; |