/// <summary> /// 0-none, 1-basket, 2-football, 3-baseball /// </summary> public void SetSport(int id) { _entitySport = (IEntity.entitySport)id; if (_entitySport == IEntity.entitySport.none) { _line.positionCount = 0; } else if (_entitySport == IEntity.entitySport.basketball) { _path = new Vector3[_resolution]; _line.positionCount = _resolution; } else if (_entitySport == IEntity.entitySport.football) { _line.positionCount = 2; } else if (_entitySport == IEntity.entitySport.baseball) { _line.positionCount = 2; } }
/// <summary> /// 0-none, 1-basket, 2-football, 3-baseball /// </summary> public void SetSport(int id) { _entitySport = (IEntity.entitySport)id; for (int i = 0; i < _sportGear.Length; i++) { _sportGear[i].SetActive(false); } if (id > 0) { _sportGear[id].SetActive(false); } }