void OnTriggerExit(Collider other) { Caught caught = other.GetComponent <Caught>(); if (caught) { caught.Release(); } }
public ProjectileInfo(double _time, GameObject _gameobject, Pair _startposition, Pair _userposition) { TimeLaunched = _time; Projectile = _gameobject.GetComponent <Projectile>(); IsCaught = Caught.Undetermined; IsFinished = false; LastSubmitted = ""; StartPosition = _startposition; UserStartPosition = _userposition; }
public void ProjectileLanded(double time, GameObject projectile, Caught caught) { foreach (ProjectileInfo current in Projectiles) { if (projectile.GetComponent <Projectile>().ID == current.ID) { current.IsCaught = caught; current.TimeLanded = time; } } }
public bool Tick() { if (PlayerPos == Layers.Keys.Max()) { return(false); } PlayerPos++; if (Layers.ContainsKey(PlayerPos) && Layers[PlayerPos].ScannerPos == 0) { Caught.Add(PlayerPos); } //(wait + pos) % (2 * (height - 1)) == 0 TickLayers(); return(true); }
void OnTriggerEnter(Collider other) { if (!other.attachedRigidbody) { return; } if (other.attachedRigidbody.isKinematic) { return; } Caught caught = other.GetComponent <Caught>(); if (!caught) { caught = other.gameObject.AddComponent <Caught>(); caught.Init(this, springForce, damper, maxDistance, minDistance); } else if (caught && !caught.enabled) { caught.Init(this, springForce, damper, maxDistance, minDistance); } }
public void it_throws_an_invalid_operation_exception() { Caught.ShouldBeInstanceOfType <InvalidOperationException>(); }
void OnTriggerEnter(Collider other) { StartCoroutine(deathSequence()); Caught?.Invoke(ValueAlongCurve); }