Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Abilities : MonoBehaviour
{
public Weapons currentWeapon;
public PlayerMovement pM;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class Superscript
{
public static int TilEmpty = 0;
public static void SaveInt(int value)
{
public class Agent : MonoBehaviour
{
public float Speed = 1f;
public Rigidbody rb1;
Vector3 movealt = new Vector3(Mathf.Round(-1), Mathf.Round(0), Mathf.Round(1));
Vector3 move = new Vector3(Mathf.Round(0), Mathf.Round(0), Mathf.Round(1));
public float height;
public float sideBounds;
public float dirMax;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CollisionBehaviour : MonoBehaviour {
[Header("Stats")]
[Tooltip("Force applied to gameobject after a collision.")]
public float BounceSpeed = 300;
[Tooltip("Damage dealt to another gameobject on collision if other object has a TakeDamage(int) function.")]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class CollisionBehaviourData {
[Header("Collision")]
[Tooltip("Tag of object colliding with.")]
public string tag;
sing System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class info
{
[Header("Collision")]
[Tooltip("When colliding with..")]
public string Hit;
public class RIP : MonoBehaviour
{
public GameObject me;
void Start()
{
StartCoroutine(StartCountdown());
}
public IEnumerator StartCountdown(int countdownValue = 1)
{
public IEnumerator StartCountdown(int countdownValue = 100)
{
currentTime = countdownValue;
while (currentTime > 0)
{
yield return new WaitForSeconds(1.0f);
currentTime--;
audio1.pitch = audio1.pitch + 0.0003f;
}
x = Random.Range(0, 360);
Instantiate(myPrefab, new Vector3(0, 3f, 0), Quaternion.Euler(0, x, 0));
void Update()
{
if (rb.velocity.magnitude < roll)
{
rb.velocity = rb.velocity.normalized * roll;
}
}