public Sack(Thrower thrower, BaseDefender defender, int yards, int fumbles) { this.fumbles = fumbles; this.yards = yards; sacker = defender; quarterBack = thrower; }
public Sack(Thrower thrower, BaseDefender defender, int yards, bool fumble) { fumbles = fumble ? 1 : 0; this.yards = yards; sacker = defender; quarterBack = thrower; }
public Rush(BallCarrier rusher, BaseDefender tackler, int yards, int yardsAfterContact, bool fumble, bool touchdown) { this.rusher = rusher; this.tackler = tackler; this.yards = yards; this.yardsAfterContact = yardsAfterContact; this.fumbles = fumble ? 1 : 0; this.touchdowns = touchdown ? 1 : 0; attempts = 1; }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Defender") { baseDefender = collision.GetComponent <BaseDefender>(); // Stop moving isMoving = 0; animator.SetBool("IsAttacking", true); } }
public Reception(int completions, int attempts, int interceptions, int touchdowns, double yardsInAir, double yardsAfterCatch) { quarterback = null; catcher = null; nearestDefender = null; this.completions = completions; this.attempts = attempts; this.interceptions = interceptions; this.yardsAfterCatch = yardsAfterCatch; this.yardsInAir = yardsInAir; this.touchdowns = touchdowns; }
public Reception(Thrower quarterback, RouteRunner catcher, BaseDefender defender, BaseDefender tackler, double yardsInAir, double yardsAfterCatch, bool completion, bool interception, bool touchdown) { this.quarterback = quarterback; this.catcher = catcher; this.tackler = tackler; this.nearestDefender = defender; this.yardsAfterCatch = yardsAfterCatch; this.yardsInAir = yardsInAir; completions = completion ? 1 : 0; interceptions = interception ? 1 : 0; touchdowns = touchdown ? 1 : 0; attempts = 1; }