コード例 #1
0
 public Sack(Thrower thrower, BaseDefender defender, int yards, int fumbles)
 {
     this.fumbles = fumbles;
     this.yards   = yards;
     sacker       = defender;
     quarterBack  = thrower;
 }
コード例 #2
0
 public Sack(Thrower thrower, BaseDefender defender, int yards, bool fumble)
 {
     fumbles     = fumble ? 1 : 0;
     this.yards  = yards;
     sacker      = defender;
     quarterBack = thrower;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.tag == "Defender")
        {
            baseDefender = collision.GetComponent <BaseDefender>();

            // Stop moving
            isMoving = 0;
            animator.SetBool("IsAttacking", true);
        }
    }
コード例 #5
0
 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;
 }
コード例 #6
0
 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;
 }