public ssg.CapsuleCollider GetBallTakeoverCollider() { var collider = transform.Find("BallTakeover").gameObject.GetComponent <CapsuleCollider>(); var capsuleCollider = new ssg.CapsuleCollider(); capsuleCollider.LocalCenter = collider.center; capsuleCollider.Radius = collider.radius; return(capsuleCollider); }
public Player(PlayerView playerView, byte team, byte index, PlayerDirection playerDirection, ssg.CapsuleCollider ballTakeoverCollider, Match match) { m_playerView = playerView; Team = team; Index = index; m_direction = playerDirection; BallTakeoverCollider = ballTakeoverCollider; BallTakeoverCollider.Trans = this; ballTakeoverCollider.Tag = (int)ObjectId.Player; m_match = match; SetDirection(playerDirection); PhysicsObject = new PhysicsObject(this); PhysicsObject.Friction = 40.0f; BallTakeoverCollider.CollisionEnter += BallTakeoverCollider_CollisionEnter; BallTakeoverCollider.CollisionLeave += BallTakeoverCollider_CollisionLeave; SetIdle(); }