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
use std::cmp::{max, min}; | |
use std::{ | |
collections::{BTreeMap, BTreeSet}, | |
io::Read, | |
}; | |
fn main() { | |
// take input from kattis | |
let mut input = String::new(); | |
let _result = std::io::stdin() |
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
protected override void FighterBehavior() | |
{ | |
/* ATTEMPT 2: | |
* Avoid attack, then attack. | |
*/ | |
if (EnemyIsAttacking()) | |
{ | |
MoveBackward(); | |
} |
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; | |
using UnityEngine; | |
namespace Tools.Editor.Drawers | |
{ | |
[CustomPropertyDrawer(typeof(Optional<>))] | |
public class OptionalPropertyDrawer : PropertyDrawer | |
{ | |
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) | |
{ |
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 UnityEngine; | |
namespace Tools | |
{ | |
[Serializable] | |
public struct Optional<T> | |
{ | |
[SerializeField] private bool enabled; | |
[SerializeField] private T value; |
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; | |
namespace ScriptTools | |
{ | |
public static class AnimationCurveHelpers | |
{ | |
/// <summary> | |
/// A helper for flipping an animation curve. | |
/// </summary> | |
/// <param name="curve"></param> |