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 EnemyUnit | |
{ | |
public bool Enabled; // Is the object active within the environment? | |
public bool IsAlive; // Has the object been killed yet? | |
public bool CanBeHit; // Can the enemy be hit or is it currently invulnerable or dead? | |
public void OnHit() | |
{ | |
if(Enabled) | |
{ |
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 EnemyUnit | |
{ | |
public bool Enabled; // Is the object active within the environment? | |
public bool IsAlive; // Has the object been killed yet? | |
public bool CanBeHit; // Can the enemy be hit or is it currently invulnerable or dead? | |
public void OnHit() | |
{ | |
if(Enabled) | |
{ |
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 enum States | |
{ | |
Idle, | |
Walking, | |
Running | |
} | |
public float speed = 0.0f; | |
public void SetState(States newState) |
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
class Solution: | |
def maxSubArray(self, nums: List[int]) -> int: | |
solutions = [] | |
bestSolution = -sys.maxsize - 1 | |
for i in range(0, len(nums)): | |
num = nums[i] | |
prevSolution = 0 | |
if(i > 0): | |
prevSolution = solutions[i - 1] | |
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; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
/** | |
* A simple copy of example code from the manual, modified to orient particles | |
* based on the center of the system. | |
*/ |
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
(function() | |
{ | |
'use strict'; | |
angular | |
.module('vid.vids.controllers') | |
.controller('NewVidController', NewVidController) | |
NewVidController.$inject = ['$rootScope', '$scope', 'Authentication', 'Snackbar', 'Vids', 'cloudinary']; |
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; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
public class CollectionsExample : MonoBehaviour | |
{ | |
void Start() | |
{ |
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; | |
using UnityEditor; | |
public class ReallyBreakPrefabInstance | |
{ | |
[MenuItem ("GameObject/REALLY Break Prefab Instance")] | |
public static void BreakIt() | |
{ | |
Transform xForm = Selection.activeTransform; | |
if(xForm != null) |
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; | |
using UnityEditor; | |
using System.Text; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class SerializedPropertyViewer : EditorWindow | |
{ | |
public class SPData |
NewerOlder