View Highlight.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>HighLight Js Example </title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/default.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"></script> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" | |
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" |
View CpuUses.cs
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.Diagnostics; | |
using System.IO; | |
using System.Text; | |
namespace CpuUses | |
{ | |
class Program | |
{ | |
static PerformanceCounter cpuCounter; |
View LeetCodeTreeMaker.cs
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
public class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var arr = new int[] {1,2,3,4,5,6,7,8,9}; | |
var tree = new LeetCodeTree().MakeTree(arr); | |
BFS(tree); | |
} | |
} | |
public class LeetCodeTree |
View MaterialColor.cs
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
var newObstacle = Instantiate(cube, new Vector3(i, 0, j), Quaternion.identity, transform); | |
Renderer obstacleRenderer = newObstacle.GetComponent<Renderer>(); | |
Material mat = new Material(obstacleRenderer.sharedMaterial); | |
mat.color = GetRandomColor(); | |
obstacleRenderer.sharedMaterial = mat; | |
// | |
public Color GetRandomColor() |
View Editor.cs
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
// MapGenerator is class on which this custom editor will be called | |
using UnityEditor; | |
[CustomEditor(typeof(MapGenerator))] | |
public class Edit : Editor | |
{ | |
public override void OnInspectorGUI() | |
{ | |
base.OnInspectorGUI(); | |
// if you remove |^|(base.OnInspectorGUI(); ) | |
// variable in inspector may not show up properly |
View ShapesData.cs
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 System.Drawing; | |
using UnityEngine; | |
using static TMPro.SpriteAssetUtilities.TexturePacker_JsonArray; | |
public class ShapesData | |
{ | |
public float circleRadius; | |
public Vector2 rectangle; |
View Edit.cs
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 UnityEditor; | |
[CustomEditor(typeof(MapGenerator))] | |
public class Edit : Editor | |
{ | |
public override void OnInspectorGUI() | |
{ | |
base.OnInspectorGUI(); | |
MapGenerator mapGenerator = (MapGenerator)target; | |
mapGenerator.Function(); | |
} |
View PrefabInstantiate.cs
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 MapGenerator : MonoBehaviour | |
{ | |
public GameObject objectToGenerated; | |
public float theta; | |
public float radius; | |
View ChangingMaterials.cs
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 System.Collections.Generic; | |
using UnityEngine; | |
public class DeerScript : MonoBehaviour | |
{ | |
// this is gameobject whose material will be changed | |
public GameObject target; | |
View Countdown.cs
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 System.Collections.Generic; | |
using UnityEngine; | |
using TMPro; | |
public class CountDown : MonoBehaviour | |
{ | |
public float InstantiationTimer = 2f; | |
public float interval = 2f; |
NewerOlder