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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SoundRandomiser : MonoBehaviour | |
{ | |
[SerializeField] private AudioClip[] audioClips = new AudioClip[1]; | |
[SerializeField] private float pitchVariation; | |
private AudioSource audioSource; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class MAPField : MonoBehaviour { | |
[SerializeField] protected Text textBox; | |
[SerializeField] protected string prefix; | |
[SerializeField] protected string suffix = ""; |
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; | |
using UnityEngine.Networking; | |
public class LadderWall : NetworkBehaviour | |
{ | |
[SerializeField] private Transform ladder; | |
[SyncVar(hook = "OnLadderStateChange")] | |
public bool ladderActive = false; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CameraClipping : MonoBehaviour | |
{ | |
private GameObject currentBuilding; | |
private GameObject[] objectsNotToHide; | |
MeshRenderer[][] meshesNotToHide; |
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; | |
using UnityEngine.Networking; | |
public class MultiplayerController : MonoBehaviour | |
{ | |
[SerializeField] private bool alwaysHost = false; | |
private NetworkManager netManager; | |
private int playerCount = -1; | |
private void Start() |
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 GRGController : MonoBehaviour | |
{ | |
[SerializeField] Vector3 centrePoint; | |
[SerializeField] private float scale; | |
[SerializeField] private Transform player; | |
private GameObject map; | |
private Transform dot; |
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
// Runs through each planet in the level to calculate its acceleration to each | |
void Acceleration() | |
{ | |
if (gameMode != 2) | |
{ | |
for (int i = 0; i < noOfPlanetoids; i++) | |
{ | |
if (!hitPortal && (!hitPlanetoid || planetoidHit == i)) AccelerateTo(new Vector2(planetoids[i].transform.position.x, planetoids[i].transform.position.y), planetoidFieldStrength[i], planetoidRadius[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
// Unity tool that checks all sprites and images on all children of a parent object and determines and lists all the sprite atlases | |
// used and many times. Gives a warning if any atlas is used for fewer sprites than a user-set threshold. | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.U2D; | |
using UnityEngine.UI; | |
using UnityEditor; |
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
// Class for the Infantry unit, inheriting from the Soldier class | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Infantry : Soldier { | |
void Start() | |
{ |
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
// Start of the Unit class, from which soldiers (infantry, sniper, grenadier), tanks (heavy tank, medium tank) and heavy weapons | |
// (machine gun, at gun) inherit | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Unit : MonoBehaviour { | |
public int type; |
NewerOlder