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 readonly struct status{ | |
readonly int ω; | |
public static readonly status done = new status( +1 ), fail = new status( -1 ), cont = new status( 0 ); | |
public bool failing => ω == -1; | |
public bool running => ω == 0; | |
public bool complete => ω == +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 Ex = System.Exception; | |
using T = UnityEngine.Transform; using UnityEngine; | |
using Active.Core; using static Active.Core.status; using Active.Util; | |
namespace Activ.Kabuki{ | |
public class Actor : XTask{ | |
public float speed = 1, rotationSpeed = 180; | |
public Transform hold; // for holding an object in hand | |
public Vector3 holdOffset; |
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
// (╯°□°)╯ ⌢ C# | |
⊐ System; ⊐̥ UnityEngine.Time; | |
⊓ Active.Howl{ | |
‒ ○ Cache<T> ¿ T: ⊟{ | |
T? ω; ⒡<T> evaluator; ㅅ duration, end; | |
‒ Cache(⒡<T> φ, ㅅ expiry = 1f){ | |
evaluator = φ; duration = expiry; |
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 Active.Core; | |
using static Active.Core.status; | |
using Auto = System.Runtime.CompilerServices.CallerMemberNameAttribute; | |
public class Duelist : UTask{ | |
const string WALK = "Walk", RUN = "Run", IDLE = "Idle"; | |
const float rotationalSpeed = 180; | |
// | |
public string targetName; |
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 Active.Core; | |
using static Active.Core.status; | |
using Tag = System.Runtime.CompilerServices.CallerLineNumberAttribute; | |
[Serializable] public class Cooldown : Conditional { | |
public float duration = 1f; | |
float stamp = System.Single.MinValue; |
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
set -ex | |
apt-get update | |
apt-get install -y python3-pip | |
pip3 install —upgrade pip | |
pip3 install awscli --upgrade --user | |
echo "export PATH=~/.local/bin:\$PATH" >> ~/.bashrc | |
aws —version |
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; | |
[ExecuteInEditMode] | |
public class SimpleFlightControls : MonoBehaviour { | |
[Header("Parameters")] | |
[Tooltip("Current/Default Speed")] | |
public float speed = 1.0f; |
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; | |
public class Hop : MonoBehaviour { | |
public float low=0.14f; // min hopping height | |
public float high=0.6f; // max hopping height | |
public float distance=1.0f; // distance to hop | |
public float cooldown = 0.5f; // min. time between hops | |
public float strength=2.5f; // impulse in Newtons/kg | |
public float minSpeed = 0.3f; // min speed to hop |
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 base = 3 | |
var max = 20 | |
var data = [0] | |
var index = 0 | |
for _ in 1...max{ | |
var applied = false | |
while !applied{ | |
if index>=data.count{ | |
data.append(0) |
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; | |
public class PUNNetworkController : MonoBehaviour { | |
void Start(){ PhotonNetwork.ConnectUsingSettings("v4.2"); } | |
void OnJoinLobby(){ StartGame (); } | |
void OnConnectedToMaster(){ StartGame (); } | |
void StartGame(){ PhotonNetwork.JoinRandomRoom(); } | |
void OnPhotonRandomJoinFailed(){ PhotonNetwork.CreateRoom("MyMatch"); } | |
void OnPhotonCreateGameFailed(){ Debug.LogError ("Create game failed"); } |
NewerOlder