yracing.car package

Submodules

yracing.car.ai module

class yracing.car.ai.AbsAiLogic(car, cars, player_car, debug=False)[source]

Bases: yyagl.computer_proxy.ComputerProxy, yyagl.gameobject.GameObject

property car_dot_traj
clear()[source]
destroy()[source]
get_obstacles()[source]
hit_res(direction)[source]
property tgt_vec
class yracing.car.ai.CarAi(mediator, car_props, players)[source]

Bases: yyagl.gameobject.AiColleague, yyagl.computer_proxy.ComputerProxy

property acceleration
brake(obstacles, obstacles_back)[source]
property curr_logic
destroy()[source]
get_input()[source]
property is_on_road
left_right(obstacles, brake, obstacles_back)[source]
on_frame()[source]
class yracing.car.ai.CarAiPoller[source]

Bases: object

property current
destroy()[source]
set_cars(cars)[source]
tick()[source]
class yracing.car.ai.CarResultsAi(mediator, car_props, players)[source]

Bases: yracing.car.ai.CarAi

class yracing.car.ai.DebugLines(color)[source]

Bases: object

clear()[source]
destroy()[source]
draw(start, end)[source]
class yracing.car.ai.DirKeys(forward, left, rear, right)[source]

Bases: object

class yracing.car.ai.FrontAiLogic(car, cars, player_car, debug=False)[source]

Bases: yracing.car.ai.AbsAiLogic

static bnd_idx(direction)[source]
property car_vec
property curr_tgt_wp
on_brake(dist_center, dist_left, dist_right)[source]
class yracing.car.ai.LastObstInfo(direction, time)[source]

Bases: object

class yracing.car.ai.ObstInfo(name, dist)[source]

Bases: object

class yracing.car.ai.RearAiLogic(car, cars, player_car, debug=False)[source]

Bases: yracing.car.ai.AbsAiLogic

static bnd_idx(direction)[source]
property car_vec
property curr_tgt_wp
on_brake(dist_center, dist_left, dist_right)[source]

yracing.car.audio module

class yracing.car.audio.AbsAudioUpdate(engine_sfx, brake_sfx)[source]

Bases: object

destroy()[source]
update(skidmarking, speed_ratio, input_, drifting, flying, rolling)[source]
class yracing.car.audio.CarAudio(mediator, *args, **kwargs)[source]

Bases: yyagl.gameobject.AudioColleague

on_play()[source]
class yracing.car.audio.CarPlayerAudio(mediator, props)[source]

Bases: yracing.car.audio.CarAudio

destroy()[source]
on_play()[source]
update(is_skidmarking, speed_ratio, input_, is_drifting, is_flying, is_rolling)[source]
class yracing.car.audio.CarSounds(engine, brake, crash, crash_hs, lap, landing, pitstop, rocket_fired, rocket_hit, turbo, rotate_all_fired, rotate_all_hit)[source]

Bases: object

class yracing.car.audio.CountDownAudioUpdate(engine_sfx, brake_sfx)[source]

Bases: yracing.car.audio.AbsAudioUpdate

update(skidmarking, speed_ratio, input_, drifting, flying, rolling)[source]
class yracing.car.audio.RaceAudioUpdate(engine_sfx, brake_sfx)[source]

Bases: yracing.car.audio.AbsAudioUpdate

update(skidmarking, speed_ratio, input_, drifting, flying, rolling)[source]

yracing.car.car module

class yracing.car.car.AiCar(car_props, player_car_idx, tuning, players)[source]

Bases: yracing.car.car.Car

ai_cls

alias of yracing.car.ai.CarAi

event_cls

alias of yracing.car.event.CarAiEvent

class yracing.car.car.AiCarPlayer(car_props, player_car_idx, tuning, players)[source]

Bases: yracing.car.car.AiCar, yracing.car.car.CarPlayer

event_cls

alias of yracing.car.event.CarAiPlayerEvent

class yracing.car.car.Car(car_props, player_car_idx, tuning, players)[source]

Bases: yyagl.gameobject.GameObject, yracing.car.car.CarFacade

ai_cls

alias of yyagl.gameobject.AiColleague

audio_cls

alias of yracing.car.audio.CarAudio

destroy()[source]
event_cls

alias of yracing.car.event.CarEvent

fsm_cls

alias of yracing.car.fsm.CarFsm

gfx_cls

alias of yracing.car.gfx.CarGfx

gui_cls

alias of yracing.car.gui.CarGui

logic_cls

alias of yracing.car.logic.CarLogic

phys_cls

alias of yracing.car.phys.CarPhys

class yracing.car.car.CarFacade[source]

Bases: yyagl.facade.Facade

class yracing.car.car.CarPlayer(car_props, player_car_idx, tuning, players)[source]

Bases: yracing.car.car.Car

audio_cls

alias of yracing.car.audio.CarPlayerAudio

event_cls

alias of yracing.car.event.CarPlayerEvent

fsm_cls

alias of yracing.car.fsm.CarPlayerFsm

gfx_cls

alias of yracing.car.gfx.CarPlayerGfx

gui_cls

alias of yracing.car.gui.CarPlayerGui

logic_cls

alias of yracing.car.logic.CarPlayerLogic

phys_cls

alias of yracing.car.phys.CarPlayerPhys

class yracing.car.car.CarPlayerClient(car_props, player_car_idx, tuning, players)[source]

Bases: yracing.car.car.Car

audio_cls

alias of yracing.car.audio.CarPlayerAudio

event_cls

alias of yracing.car.event.CarPlayerEventClient

gui_cls

alias of yracing.car.gui.CarPlayerMPGui

logic_cls

alias of yracing.car.logic.CarPlayerLogic

class yracing.car.car.CarPlayerLocalMP(car_props, player_car_idx, tuning, players)[source]

Bases: yracing.car.car.CarPlayer

gui_cls

alias of yracing.car.gui.CarPlayerLocalMPGui

class yracing.car.car.CarPlayerServer(car_props, player_car_idx, tuning, players)[source]

Bases: yracing.car.car.Car

audio_cls

alias of yracing.car.audio.CarPlayerAudio

event_cls

alias of yracing.car.event.CarPlayerEventServer

gui_cls

alias of yracing.car.gui.CarPlayerMPGui

logic_cls

alias of yracing.car.logic.CarPlayerLogic

class yracing.car.car.CarProps(race_props, name, pos, hpr, callback, race, driver_engine, driver_tires, driver_suspensions, track_waypoints, track_skidmark_col, ai_poller)[source]

Bases: object

class yracing.car.car.NetworkCar(car_props, player_car_idx, tuning, players)[source]

Bases: yracing.car.car.Car

event_cls

alias of yracing.car.event.CarNetworkEvent

gfx_cls

alias of yracing.car.gfx.CarNetworkGfx

gui_cls

alias of yracing.car.gui.CarNetworkGui

yracing.car.decorator module

class yracing.car.decorator.Decorator(fpath, parent)[source]

Bases: yyagl.gameobject.GameObject

destroy()[source]

yracing.car.event module

class yracing.car.event.CarAiEvent(mediator, race_props, players)[source]

Bases: yracing.car.event.CarEvent

class yracing.car.event.CarAiPlayerEvent(mediator, race_props, players)[source]

Bases: yracing.car.event.CarAiEvent, yracing.car.event.CarPlayerEvent

class yracing.car.event.CarEvent(mediator, race_props, players)[source]

Bases: yyagl.gameobject.EventColleague, yyagl.computer_proxy.ComputerProxy

destroy()[source]
on_bonus(cls=None, wpn_id=None)[source]
on_collision(obj, tgt_obj)[source]
on_damage(level)[source]
on_frame()[source]
on_rotate_all(sender)[source]
process_respawn()[source]
start()[source]
class yracing.car.event.CarNetworkEvent(mediator, race_props, players)[source]

Bases: yracing.car.event.CarEvent

on_bonus(wpn_cls=None)[source]
set_fired_weapon()[source]
set_weapon(wpn_cls, wpn_id)[source]
unset_fired_weapon(wpn)[source]
unset_weapon()[source]
class yracing.car.event.CarPlayerEvent(mediator, race_props, players)[source]

Bases: yracing.car.event.CarEvent

destroy()[source]
on_bonus(cls=None, wpn_id=None)[source]
on_collision(obj, tgt_obj)[source]
on_fire()[source]
on_frame()[source]
class yracing.car.event.CarPlayerEventClient(mediator, race_props, players)[source]

Bases: yracing.car.event.CarPlayerEvent

on_frame()[source]
class yracing.car.event.CarPlayerEventServer(mediator, race_props, players)[source]

Bases: yracing.car.event.CarPlayerEvent

class yracing.car.event.DirKeys(forward, rear, left, right)[source]

Bases: object

class yracing.car.event.InputBuilder[source]

Bases: object

static create(state, joystick)[source]
class yracing.car.event.InputBuilderAi[source]

Bases: yracing.car.event.InputBuilder

build(ai, joystick_mgr, player_car_idx, car_evt)[source]
class yracing.car.event.InputBuilderPlayer[source]

Bases: yracing.car.event.InputBuilder

build(ai, joystick_mgr, player_car_idx, car_evt, fire_key, respawn_key)[source]
class yracing.car.event.Keys(players_keys, pause)[source]

Bases: object

class yracing.car.event.PlayerKeys(forward, rear, left, right, fire, respawn)[source]

Bases: object

yracing.car.fsm module

class yracing.car.fsm.CarFsm(mediator, car_props, players)[source]

Bases: yyagl.gameobject.FsmColleague

enterPlay()[source]
enterWaiting()[source]
class yracing.car.fsm.CarPlayerFsm(mediator, car_props, players)[source]

Bases: yracing.car.fsm.CarFsm

enterResults()[source]
enterWaiting()[source]

yracing.car.gfx module

class yracing.car.gfx.CarGfx(mediator, car_props)[source]

Bases: yyagl.gameobject.GfxColleague, yracing.car.gfx.CarGfxFacade

apply_damage(reset=False)[source]
crash_sfx()[source]
destroy()[source]
load()[source]
load_wheels(chassis_model)[source]
preload_tsk()[source]
reparent()[source]
set_decorator(dec_code, remove=True)[source]
set_emitters()[source]
unset_decorator(dec)[source]
class yracing.car.gfx.CarGfxFacade[source]

Bases: yyagl.facade.Facade

class yracing.car.gfx.CarNetworkGfx(mediator, car_props)[source]

Bases: yracing.car.gfx.CarGfx

preload_tsk()[source]
class yracing.car.gfx.CarPlayerGfx(mediator, car_props)[source]

Bases: yracing.car.gfx.CarGfx

crash_sfx()[source]
class yracing.car.gfx.SkidmarkMgr(car)[source]

Bases: yyagl.gameobject.GameObject

destroy()[source]
on_no_skidmarking()[source]
on_skidmarking()[source]

yracing.car.gui module

class yracing.car.gui.CarAIPanel[source]

Bases: yyagl.gameobject.GameObject

hide()[source]
update()[source]
class yracing.car.gui.CarGui(mediator, *args, **kwargs)[source]

Bases: yyagl.gameobject.GuiColleague

apply_damage(reset=False)[source]
hide()[source]
class yracing.car.gui.CarMultiPlayerPanel(car_props, player_idx, ncars, players)[source]

Bases: yracing.car.gui.CarPanel

enter_waiting()[source]
exit_waiting()[source]
class yracing.car.gui.CarNetworkGui(mediator, car_props, players)[source]

Bases: yracing.car.gui.CarGui

destroy()[source]
hide()[source]
on_frame()[source]
class yracing.car.gui.CarOnlineMPPanel(race_props, player_idx, ncars, players)[source]

Bases: yracing.car.gui.CarPanel

class yracing.car.gui.CarPanel(car_props, player_idx, ncars, players)[source]

Bases: yyagl.gameobject.GameObject

apply_damage(reset=False)[source]
destroy()[source]
enter_waiting()[source]
exit_waiting()[source]
hide()[source]
hide_forward()[source]
set_forward_angle(angle)[source]
set_weapon(wpn)[source]
show_forward()[source]
unset_weapon()[source]
class yracing.car.gui.CarParameter(attr_name, init_val, pos, val_range, callback, args=[])[source]

Bases: yyagl.gameobject.GameObject

destroy()[source]
hide()[source]
property is_visible
toggle()[source]
class yracing.car.gui.CarParameters(phys, logic)[source]

Bases: yyagl.gameobject.GameObject

assign_val(val, phys, field)[source]
assign_val_whl(val, phys, field)[source]
destroy()[source]
hide()[source]
toggle()[source]
class yracing.car.gui.CarPlayerGui(mediator, car_props, players)[source]

Bases: yracing.car.gui.CarGui

apply_damage(reset=False)[source]
destroy()[source]
hide()[source]
hide_forward()[source]
property ncars
on_wrong_way(way_str)[source]
panel_cls

alias of CarPanel

property parent
show_forward()[source]
upd_ai()[source]
upd_ranking(ranking)[source]
class yracing.car.gui.CarPlayerLocalMPGui(mediator, car_props, players)[source]

Bases: yracing.car.gui.CarPlayerGui

property ncars
panel_cls

alias of CarMultiPlayerPanel

class yracing.car.gui.CarPlayerMPGui(mediator, car_props, players)[source]

Bases: yracing.car.gui.CarPlayerGui

panel_cls

alias of CarOnlineMPPanel

property parent
class yracing.car.gui.EagerCaller(meth, *args)[source]

Bases: object

call(arg)[source]

yracing.car.logic module

class yracing.car.logic.CarLogic(mediator, car_props, players)[source]

Bases: yyagl.gameobject.LogicColleague, yyagl.computer_proxy.ComputerProxy

property bitmask
property car_vec
property car_vec_3d
closest_wp()[source]
property correct_lap
property curr_chassis
property curr_chassis_name
destroy()[source]
property direction
static dist_to_segment(p, p0, p1)[source]
fire()[source]
property fly_time
property has_rear_weapon
property hi_chassis_name
property is_drifting
property is_rolling
property is_rotating
property is_skidmarking
property is_upside_down
property lap_time
property laps_num
last_wp_not_fork()[source]
not_fork_wps()[source]
on_weapon_destroyed(wpn)[source]
static pt_line_dst(point, line_pt1, line_pt2)[source]
reset_car()[source]
reset_waypoints()[source]
set_damage(level)[source]
unset_fired_weapon(wpn)[source]
update(input2forces)[source]
update_waypoints()[source]
property wp_num
class yracing.car.logic.CarPlayerLogic(mediator, car_props, players)[source]

Bases: yracing.car.logic.CarLogic

fire()[source]
property tgt_vec
update(input_dct)[source]
class yracing.car.logic.DriftingForce(car)[source]

Bases: object

process(input_dct)[source]
class yracing.car.logic.Input2ForcesStrategy(is_player, car)[source]

Bases: object

get_eng_frc(eng_frc, fwd, brk)[source]
input2forces(car_input, joystick_mgr, is_drifting, player_car_idx, curr_time, acc_key, brk_key, a_i)[source]
input2forces_analog(car_input, joystick_mgr, is_drifting, player_car_idx, curr_time, acc_key, brk_key)[source]
input2forces_discrete(car_input, joystick_mgr, is_drifting, player_car_idx, curr_time)[source]
static new_val(val, tgt, incr, decr)[source]
steering_clamp(is_drifting)[source]
property steering_dec
property steering_inc
turn_time = 0.1
class yracing.car.logic.WPInfo(prev, next_)[source]

Bases: object

yracing.car.phys module

class yracing.car.phys.CarPhys(mediator, car_props, tuning, players)[source]

Bases: yyagl.gameobject.PhysColleague

apply_damage(reset=False)[source]
destroy()[source]
get_friction()[source]
get_friction_static()[source]
get_roll_influence()[source]
get_roll_influence_static()[source]
get_speed()[source]
static gnd_height(pos)[source]
static gnd_name(pos)[source]
property gnd_names
property is_drifting
property is_flying
property last_drift_time
property lateral_force
property lin_vel
property lin_vel_ratio
on_end_frame()[source]
property prev_speed
property prev_speed_ratio
rotate()[source]
set_forces(eng_frc, brake_frc, brk_ratio, steering)[source]
property speed
property speed_ratio
update_car_props()[source]
class yracing.car.phys.CarPlayerPhys(mediator, car_props, tuning, players)[source]

Bases: yracing.car.phys.CarPhys

get_friction()[source]
get_friction_static()[source]
get_roll_influence()[source]
get_roll_influence_static()[source]
get_speed()[source]
rotate()[source]

yracing.car.skidmark module

class yracing.car.skidmark.Skidmark(whl_pos, whl_radius, car_h)[source]

Bases: yyagl.gameobject.GameObject

add_vertices(whl_radius, car_h)[source]
destroy()[source]
update(whl_pos, car_h)[source]

Module contents