mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 06:53:18 +08:00
Cleaned up docs categories and general tidying.
This commit is contained in:
parent
7d46a57ef6
commit
1560a15ddd
2
.idea/dictionaries/ericf.xml
generated
2
.idea/dictionaries/ericf.xml
generated
@ -10,6 +10,8 @@
|
|||||||
<w>aaag</w>
|
<w>aaag</w>
|
||||||
<w>aaah</w>
|
<w>aaah</w>
|
||||||
<w>aaai</w>
|
<w>aaai</w>
|
||||||
|
<w>aaaj</w>
|
||||||
|
<w>aaak</w>
|
||||||
<w>aarch</w>
|
<w>aarch</w>
|
||||||
<w>abcdefghijklmnopqrstuvwxyz</w>
|
<w>abcdefghijklmnopqrstuvwxyz</w>
|
||||||
<w>abeb</w>
|
<w>abeb</w>
|
||||||
|
|||||||
@ -188,7 +188,10 @@ def _display_next_achievement() -> None:
|
|||||||
|
|
||||||
|
|
||||||
class Achievement:
|
class Achievement:
|
||||||
"""Represents attributes and state for an individual achievement."""
|
"""Represents attributes and state for an individual achievement.
|
||||||
|
|
||||||
|
Category: App Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
name: str,
|
name: str,
|
||||||
|
|||||||
@ -37,7 +37,7 @@ if TYPE_CHECKING:
|
|||||||
class App:
|
class App:
|
||||||
"""A class for high level app functionality and state.
|
"""A class for high level app functionality and state.
|
||||||
|
|
||||||
category: General Utility Classes
|
category: App Classes
|
||||||
|
|
||||||
Use ba.app to access the single shared instance of this class.
|
Use ba.app to access the single shared instance of this class.
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ if TYPE_CHECKING:
|
|||||||
class AppConfig(dict):
|
class AppConfig(dict):
|
||||||
"""A special dict that holds the game's persistent configuration values.
|
"""A special dict that holds the game's persistent configuration values.
|
||||||
|
|
||||||
Category: General Utility Classes
|
Category: App Classes
|
||||||
|
|
||||||
It also provides methods for fetching values with app-defined fallback
|
It also provides methods for fetching values with app-defined fallback
|
||||||
defaults, applying contained values to the game, and committing the
|
defaults, applying contained values to the game, and committing the
|
||||||
|
|||||||
@ -29,7 +29,10 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
class AppDelegate:
|
class AppDelegate:
|
||||||
"""Defines handlers for high level app functionality."""
|
"""Defines handlers for high level app functionality.
|
||||||
|
|
||||||
|
Category: App Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def create_default_game_config_ui(
|
def create_default_game_config_ui(
|
||||||
self, gameclass: Type[ba.GameActivity], sessionclass: Type[ba.Session],
|
self, gameclass: Type[ba.GameActivity], sessionclass: Type[ba.Session],
|
||||||
|
|||||||
@ -41,7 +41,10 @@ def get_campaign(name: str) -> ba.Campaign:
|
|||||||
|
|
||||||
|
|
||||||
class Campaign:
|
class Campaign:
|
||||||
"""Represents a unique set or series of ba.Levels."""
|
"""Represents a unique set or series of ba.Levels.
|
||||||
|
|
||||||
|
Category: App Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, name: str, sequential: bool = True):
|
def __init__(self, name: str, sequential: bool = True):
|
||||||
self._name = name
|
self._name = name
|
||||||
|
|||||||
@ -184,6 +184,8 @@ class DependencyEntry:
|
|||||||
class DependencySet(Generic[T]):
|
class DependencySet(Generic[T]):
|
||||||
"""Set of resolved dependencies and their associated data.
|
"""Set of resolved dependencies and their associated data.
|
||||||
|
|
||||||
|
Category: Dependency Classes
|
||||||
|
|
||||||
To use DependencyComponents, a set must be created, resolved, and then
|
To use DependencyComponents, a set must be created, resolved, and then
|
||||||
loaded. The DependencyComponents are only valid while the set remains
|
loaded. The DependencyComponents are only valid while the set remains
|
||||||
in existence.
|
in existence.
|
||||||
@ -306,7 +308,10 @@ class DependencySet(Generic[T]):
|
|||||||
|
|
||||||
|
|
||||||
class AssetPackage(DependencyComponent):
|
class AssetPackage(DependencyComponent):
|
||||||
"""DependencyComponent representing a bundled package of game assets."""
|
"""ba.DependencyComponent representing a bundled package of game assets.
|
||||||
|
|
||||||
|
Category: Asset Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|||||||
@ -311,7 +311,10 @@ def animate_array(node: ba.Node,
|
|||||||
|
|
||||||
def show_damage_count(damage: str, position: Sequence[float],
|
def show_damage_count(damage: str, position: Sequence[float],
|
||||||
direction: Sequence[float]) -> None:
|
direction: Sequence[float]) -> None:
|
||||||
"""Pop up a damage count at a position in space."""
|
"""Pop up a damage count at a position in space.
|
||||||
|
|
||||||
|
Category: Gameplay Functions
|
||||||
|
"""
|
||||||
lifespan = 1.0
|
lifespan = 1.0
|
||||||
app = _ba.app
|
app = _ba.app
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,10 @@ class ChangeMessage:
|
|||||||
|
|
||||||
|
|
||||||
class Chooser:
|
class Chooser:
|
||||||
"""A character/team selector for a single player."""
|
"""A character/team selector for a ba.Player.
|
||||||
|
|
||||||
|
Category: Gameplay Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def __del__(self) -> None:
|
def __del__(self) -> None:
|
||||||
|
|
||||||
@ -858,7 +861,10 @@ class Chooser:
|
|||||||
|
|
||||||
|
|
||||||
class Lobby:
|
class Lobby:
|
||||||
"""Container for choosers."""
|
"""Container for ba.Choosers.
|
||||||
|
|
||||||
|
Category: Gameplay Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def __del__(self) -> None:
|
def __del__(self) -> None:
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,10 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
class MusicType(Enum):
|
class MusicType(Enum):
|
||||||
"""Types of music available to play in-game."""
|
"""Types of music available to play in-game.
|
||||||
|
|
||||||
|
Category: Enums
|
||||||
|
"""
|
||||||
MENU = 'Menu'
|
MENU = 'Menu'
|
||||||
VICTORY = 'Victory'
|
VICTORY = 'Victory'
|
||||||
CHAR_SELECT = 'CharSelect'
|
CHAR_SELECT = 'CharSelect'
|
||||||
@ -61,7 +64,10 @@ class MusicType(Enum):
|
|||||||
|
|
||||||
|
|
||||||
class MusicPlayMode(Enum):
|
class MusicPlayMode(Enum):
|
||||||
"""Influences behavior when playing music."""
|
"""Influences behavior when playing music.
|
||||||
|
|
||||||
|
Category: Enums
|
||||||
|
"""
|
||||||
REGULAR = 'regular'
|
REGULAR = 'regular'
|
||||||
TEST = 'test'
|
TEST = 'test'
|
||||||
|
|
||||||
@ -69,6 +75,8 @@ class MusicPlayMode(Enum):
|
|||||||
class MusicPlayer:
|
class MusicPlayer:
|
||||||
"""Wrangles soundtrack music playback.
|
"""Wrangles soundtrack music playback.
|
||||||
|
|
||||||
|
Category: App Classes
|
||||||
|
|
||||||
Music can be played either through the game itself
|
Music can be played either through the game itself
|
||||||
or via a platform-specific external player.
|
or via a platform-specific external player.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import _ba
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from weakref import ReferenceType
|
from weakref import ReferenceType
|
||||||
from typing import Sequence, List, Dict, Any, Optional, Set
|
from typing import Sequence, List, Dict, Any, Optional, Set
|
||||||
|
|
||||||
import ba
|
import ba
|
||||||
|
|
||||||
|
|
||||||
@ -90,13 +91,13 @@ class Session:
|
|||||||
min_players: int = 1,
|
min_players: int = 1,
|
||||||
max_players: int = 8,
|
max_players: int = 8,
|
||||||
allow_mid_activity_joins: bool = True):
|
allow_mid_activity_joins: bool = True):
|
||||||
# pylint: disable=too-many-statements
|
|
||||||
# pylint: disable=too-many-branches
|
|
||||||
"""Instantiate a session.
|
"""Instantiate a session.
|
||||||
|
|
||||||
depsets should be a sequence of successfully resolved ba.DependencySet
|
depsets should be a sequence of successfully resolved ba.DependencySet
|
||||||
instances; one for each ba.Activity the session may potentially run.
|
instances; one for each ba.Activity the session may potentially run.
|
||||||
"""
|
"""
|
||||||
|
# pylint: disable=too-many-statements
|
||||||
|
# pylint: disable=too-many-branches
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
# pylint: disable=cyclic-import
|
# pylint: disable=cyclic-import
|
||||||
from ba._lobby import Lobby
|
from ba._lobby import Lobby
|
||||||
@ -128,18 +129,20 @@ class Session:
|
|||||||
missing_info = [(d.cls, d.config) for d in exc.deps]
|
missing_info = [(d.cls, d.config) for d in exc.deps]
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f'Missing non-asset dependencies: {missing_info}')
|
f'Missing non-asset dependencies: {missing_info}')
|
||||||
# throw a combined exception if we found anything missing
|
|
||||||
|
# Throw a combined exception if we found anything missing.
|
||||||
if missing_asset_packages:
|
if missing_asset_packages:
|
||||||
raise DependencyError([
|
raise DependencyError([
|
||||||
Dependency(AssetPackage, set_id)
|
Dependency(AssetPackage, set_id)
|
||||||
for set_id in missing_asset_packages
|
for set_id in missing_asset_packages
|
||||||
])
|
])
|
||||||
|
|
||||||
# ok; looks like our dependencies check out.
|
# Ok; looks like our dependencies check out.
|
||||||
# now give the engine a list of asset-set-ids to pass along to clients
|
# Now give the engine a list of asset-set-ids to pass along to clients.
|
||||||
required_asset_packages: Set[str] = set()
|
required_asset_packages: Set[str] = set()
|
||||||
for depset in depsets:
|
for depset in depsets:
|
||||||
required_asset_packages.update(depset.get_asset_package_ids())
|
required_asset_packages.update(depset.get_asset_package_ids())
|
||||||
|
|
||||||
# print('Would set host-session asset-reqs to:',
|
# print('Would set host-session asset-reqs to:',
|
||||||
# required_asset_packages)
|
# required_asset_packages)
|
||||||
|
|
||||||
@ -213,8 +216,8 @@ class Session:
|
|||||||
self.lobby = Lobby()
|
self.lobby = Lobby()
|
||||||
self.stats = Stats()
|
self.stats = Stats()
|
||||||
|
|
||||||
# instantiates our session globals node.. (so it can apply
|
# Instantiate our session globals node
|
||||||
# default settings)
|
# (so it can apply default settings).
|
||||||
sharedobj('globals')
|
sharedobj('globals')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -233,13 +236,14 @@ class Session:
|
|||||||
This should return True or False to accept/reject.
|
This should return True or False to accept/reject.
|
||||||
"""
|
"""
|
||||||
from ba._lang import Lstr
|
from ba._lang import Lstr
|
||||||
# limit player counts *unless* we're in a stress test
|
|
||||||
|
# Limit player counts *unless* we're in a stress test.
|
||||||
if _ba.app.stress_test_reset_timer is None:
|
if _ba.app.stress_test_reset_timer is None:
|
||||||
|
|
||||||
if len(self.players) >= self.max_players:
|
if len(self.players) >= self.max_players:
|
||||||
|
|
||||||
# print a rejection message *only* to the client trying to join
|
# Print a rejection message *only* to the client trying to join
|
||||||
# (prevents spamming everyone else in the game)
|
# (prevents spamming everyone else in the game).
|
||||||
_ba.playsound(_ba.getsound('error'))
|
_ba.playsound(_ba.getsound('error'))
|
||||||
_ba.screenmessage(
|
_ba.screenmessage(
|
||||||
Lstr(resource='playerLimitReachedText',
|
Lstr(resource='playerLimitReachedText',
|
||||||
@ -261,14 +265,14 @@ class Session:
|
|||||||
from ba._lang import Lstr
|
from ba._lang import Lstr
|
||||||
from ba import _error
|
from ba import _error
|
||||||
|
|
||||||
# remove them from the game rosters
|
# Remove them from the game rosters.
|
||||||
if player in self.players:
|
if player in self.players:
|
||||||
|
|
||||||
_ba.playsound(_ba.getsound('playerLeft'))
|
_ba.playsound(_ba.getsound('playerLeft'))
|
||||||
|
|
||||||
team: Optional[ba.Team]
|
team: Optional[ba.Team]
|
||||||
|
|
||||||
# the player will have no team if they are still in the lobby
|
# The player will have no team if they are still in the lobby.
|
||||||
try:
|
try:
|
||||||
team = player.team
|
team = player.team
|
||||||
except _error.TeamNotFoundError:
|
except _error.TeamNotFoundError:
|
||||||
@ -298,7 +302,7 @@ class Session:
|
|||||||
# team lists every activity)
|
# team lists every activity)
|
||||||
if team is not None and player in team.players:
|
if team is not None and player in team.players:
|
||||||
|
|
||||||
# testing.. can remove this eventually
|
# Testing.. can remove this eventually.
|
||||||
if isinstance(self, FreeForAllSession):
|
if isinstance(self, FreeForAllSession):
|
||||||
if len(team.players) != 1:
|
if len(team.players) != 1:
|
||||||
_error.print_error("expected 1 player in FFA team")
|
_error.print_error("expected 1 player in FFA team")
|
||||||
@ -408,7 +412,7 @@ class Session:
|
|||||||
with _ba.Context(self):
|
with _ba.Context(self):
|
||||||
curtime = _ba.time(TimeType.REAL)
|
curtime = _ba.time(TimeType.REAL)
|
||||||
if self._ending:
|
if self._ending:
|
||||||
# ignore repeats unless its been a while..
|
# Ignore repeats unless its been a while.
|
||||||
assert self.launch_end_session_activity_time is not None
|
assert self.launch_end_session_activity_time is not None
|
||||||
since_last = (curtime - self.launch_end_session_activity_time)
|
since_last = (curtime - self.launch_end_session_activity_time)
|
||||||
if since_last < 30.0:
|
if since_last < 30.0:
|
||||||
@ -419,7 +423,7 @@ class Session:
|
|||||||
self.launch_end_session_activity_time = curtime
|
self.launch_end_session_activity_time = curtime
|
||||||
self.set_activity(_ba.new_activity(EndSessionActivity))
|
self.set_activity(_ba.new_activity(EndSessionActivity))
|
||||||
self.wants_to_end = False
|
self.wants_to_end = False
|
||||||
self._ending = True # prevents further activity-mucking
|
self._ending = True # Prevent further activity-mucking.
|
||||||
|
|
||||||
def on_team_join(self, team: ba.Team) -> None:
|
def on_team_join(self, team: ba.Team) -> None:
|
||||||
"""Called when a new ba.Team joins the session."""
|
"""Called when a new ba.Team joins the session."""
|
||||||
@ -429,7 +433,7 @@ class Session:
|
|||||||
|
|
||||||
def _complete_end_activity(self, activity: ba.Activity,
|
def _complete_end_activity(self, activity: ba.Activity,
|
||||||
results: Any) -> None:
|
results: Any) -> None:
|
||||||
# run the subclass callback in the session context
|
# Run the subclass callback in the session context.
|
||||||
try:
|
try:
|
||||||
with _ba.Context(self):
|
with _ba.Context(self):
|
||||||
self.on_activity_end(activity, results)
|
self.on_activity_end(activity, results)
|
||||||
@ -501,7 +505,7 @@ class Session:
|
|||||||
from ba._gameutils import sharedobj
|
from ba._gameutils import sharedobj
|
||||||
from ba._enums import TimeType
|
from ba._enums import TimeType
|
||||||
|
|
||||||
# sanity test - make sure this doesn't get called recursively
|
# Sanity test: make sure this doesn't get called recursively.
|
||||||
if self._in_set_activity:
|
if self._in_set_activity:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"Session.set_activity() cannot be called recursively.")
|
"Session.set_activity() cannot be called recursively.")
|
||||||
@ -509,7 +513,7 @@ class Session:
|
|||||||
if activity.session is not _ba.getsession():
|
if activity.session is not _ba.getsession():
|
||||||
raise Exception("provided activity's session is not current")
|
raise Exception("provided activity's session is not current")
|
||||||
|
|
||||||
# quietly ignore this if the whole session is going down
|
# Quietly ignore this if the whole session is going down.
|
||||||
if self._ending:
|
if self._ending:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -543,7 +547,7 @@ class Session:
|
|||||||
else:
|
else:
|
||||||
glb.slow_motion = activity.slow_motion
|
glb.slow_motion = activity.slow_motion
|
||||||
if activity.inherits_music and gprev is not None:
|
if activity.inherits_music and gprev is not None:
|
||||||
glb.music_continuous = True # prevents restarting same music
|
glb.music_continuous = True # Prevent restarting same music.
|
||||||
glb.music = gprev.music
|
glb.music = gprev.music
|
||||||
glb.music_count += 1
|
glb.music_count += 1
|
||||||
if activity.inherits_camera_vr_offset and gprev is not None:
|
if activity.inherits_camera_vr_offset and gprev is not None:
|
||||||
@ -552,53 +556,53 @@ class Session:
|
|||||||
glb.vr_overlay_center = gprev.vr_overlay_center
|
glb.vr_overlay_center = gprev.vr_overlay_center
|
||||||
glb.vr_overlay_center_enabled = gprev.vr_overlay_center_enabled
|
glb.vr_overlay_center_enabled = gprev.vr_overlay_center_enabled
|
||||||
|
|
||||||
# if they want to inherit tint from the previous activity..
|
# If they want to inherit tint from the previous activity.
|
||||||
if activity.inherits_tint and gprev is not None:
|
if activity.inherits_tint and gprev is not None:
|
||||||
glb.tint = gprev.tint
|
glb.tint = gprev.tint
|
||||||
glb.vignette_outer = gprev.vignette_outer
|
glb.vignette_outer = gprev.vignette_outer
|
||||||
glb.vignette_inner = gprev.vignette_inner
|
glb.vignette_inner = gprev.vignette_inner
|
||||||
|
|
||||||
# let the activity do its thing..
|
# Let the activity do its thing.
|
||||||
activity.start_transition_in()
|
activity.start_transition_in()
|
||||||
|
|
||||||
self._next_activity = activity
|
self._next_activity = activity
|
||||||
|
|
||||||
# if we have a current activity, tell it it's transitioning out;
|
# If we have a current activity, tell it it's transitioning out;
|
||||||
# the next one will become current once this one dies.
|
# the next one will become current once this one dies.
|
||||||
if prev_activity is not None:
|
if prev_activity is not None:
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
prev_activity._transitioning_out = True
|
prev_activity._transitioning_out = True
|
||||||
# pylint: enable=protected-access
|
# pylint: enable=protected-access
|
||||||
|
|
||||||
# activity will be None until the next one begins
|
# activity will be None until the next one begins.
|
||||||
with _ba.Context(prev_activity):
|
with _ba.Context(prev_activity):
|
||||||
prev_activity.on_transition_out()
|
prev_activity.on_transition_out()
|
||||||
|
|
||||||
# setting this to None should free up the old activity to die
|
# Setting this to None should free up the old activity to die,
|
||||||
# which will call begin_next_activity.
|
# which will call begin_next_activity.
|
||||||
# we can still access our old activity through
|
# We can still access our old activity through
|
||||||
# self._activity_weak() to keep it up to date on player
|
# self._activity_weak() to keep it up to date on player
|
||||||
# joins/departures/etc until it dies
|
# joins/departures/etc until it dies.
|
||||||
self._activity_retained = None
|
self._activity_retained = None
|
||||||
|
|
||||||
# there's no existing activity; lets just go ahead with the begin call
|
# There's no existing activity; lets just go ahead with the begin call.
|
||||||
else:
|
else:
|
||||||
self.begin_next_activity()
|
self.begin_next_activity()
|
||||||
|
|
||||||
# tell the C layer that this new activity is now 'foregrounded'
|
# Tell the C layer that this new activity is now 'foregrounded'.
|
||||||
# this means that its globals node controls global stuff and
|
# This means that its globals node controls global stuff and stuff
|
||||||
# stuff like console operations, keyboard shortcuts, etc will run in it
|
# like console operations, keyboard shortcuts, etc will run in it.
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
activity._activity_data.make_foreground()
|
activity._activity_data.make_foreground()
|
||||||
# pylint: enable=protected-access
|
# pylint: enable=protected-access
|
||||||
|
|
||||||
# we want to call _destroy() for the previous activity once it should
|
# We want to call _destroy() for the previous activity once it should
|
||||||
# tear itself down, clear out any self-refs, etc. If the new activity
|
# tear itself down, clear out any self-refs, etc. If the new activity
|
||||||
# has a transition-time, set it up to be called after that passes;
|
# has a transition-time, set it up to be called after that passes;
|
||||||
# otherwise call it immediately. After this call the activity should
|
# otherwise call it immediately. After this call the activity should
|
||||||
# have no refs left to it and should die (which will trigger the next
|
# have no refs left to it and should die (which will trigger the next
|
||||||
# activity to run)
|
# activity to run).
|
||||||
if prev_activity is not None:
|
if prev_activity is not None:
|
||||||
if activity.transition_time > 0.0:
|
if activity.transition_time > 0.0:
|
||||||
# FIXME: We should tweak the activity to not allow
|
# FIXME: We should tweak the activity to not allow
|
||||||
@ -631,11 +635,11 @@ class Session:
|
|||||||
|
|
||||||
def _request_player(self, player: ba.Player) -> bool:
|
def _request_player(self, player: ba.Player) -> bool:
|
||||||
|
|
||||||
# if we're ending, allow no new players
|
# If we're ending, allow no new players.
|
||||||
if self._ending:
|
if self._ending:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# ask the user
|
# Ask the user.
|
||||||
try:
|
try:
|
||||||
with _ba.Context(self):
|
with _ba.Context(self):
|
||||||
result = self.on_player_request(player)
|
result = self.on_player_request(player)
|
||||||
@ -644,11 +648,11 @@ class Session:
|
|||||||
_error.print_exception('error in on_player_request call for', self)
|
_error.print_exception('error in on_player_request call for', self)
|
||||||
result = False
|
result = False
|
||||||
|
|
||||||
# if the user said yes, add the player to the session list
|
# If the user said yes, add the player to the session list.
|
||||||
if result:
|
if result:
|
||||||
self.players.append(player)
|
self.players.append(player)
|
||||||
|
|
||||||
# if we have a current activity with a lobby,
|
# If we have a current activity with a lobby,
|
||||||
# ask it to bring up a chooser for this player.
|
# ask it to bring up a chooser for this player.
|
||||||
# otherwise they'll have to wait around for the next activity.
|
# otherwise they'll have to wait around for the next activity.
|
||||||
with _ba.Context(self):
|
with _ba.Context(self):
|
||||||
@ -674,16 +678,16 @@ class Session:
|
|||||||
"""
|
"""
|
||||||
if self._next_activity is not None:
|
if self._next_activity is not None:
|
||||||
|
|
||||||
# we store both a weak and a strong ref to the new activity;
|
# We store both a weak and a strong ref to the new activity;
|
||||||
# the strong is to keep it alive and the weak is so we can access
|
# the strong is to keep it alive and the weak is so we can access
|
||||||
# it even after we've released the strong-ref to allow it to die
|
# it even after we've released the strong-ref to allow it to die.
|
||||||
self._activity_retained = self._next_activity
|
self._activity_retained = self._next_activity
|
||||||
self._activity_weak = weakref.ref(self._next_activity)
|
self._activity_weak = weakref.ref(self._next_activity)
|
||||||
self._next_activity = None
|
self._next_activity = None
|
||||||
|
|
||||||
# lets kick out any players sitting in the lobby since
|
# Lets kick out any players sitting in the lobby since
|
||||||
# new activities such as score screens could cover them up;
|
# new activities such as score screens could cover them up;
|
||||||
# better to have them rejoin
|
# better to have them rejoin.
|
||||||
self.lobby.remove_all_choosers_and_kick_players()
|
self.lobby.remove_all_choosers_and_kick_players()
|
||||||
activity = self._activity_weak()
|
activity = self._activity_weak()
|
||||||
assert activity is not None
|
assert activity is not None
|
||||||
@ -695,8 +699,8 @@ class Session:
|
|||||||
lobby = chooser.lobby
|
lobby = chooser.lobby
|
||||||
activity = self._activity_weak()
|
activity = self._activity_weak()
|
||||||
|
|
||||||
# in joining activities, we wait till all choosers are ready
|
# In joining activities, we wait till all choosers are ready
|
||||||
# and then create all players at once
|
# and then create all players at once.
|
||||||
if activity is not None and activity.is_joining_activity:
|
if activity is not None and activity.is_joining_activity:
|
||||||
if lobby.check_all_ready():
|
if lobby.check_all_ready():
|
||||||
choosers = lobby.get_choosers()
|
choosers = lobby.get_choosers()
|
||||||
@ -705,7 +709,8 @@ class Session:
|
|||||||
for lch in lobby.get_choosers():
|
for lch in lobby.get_choosers():
|
||||||
self._add_chosen_player(lch)
|
self._add_chosen_player(lch)
|
||||||
lobby.remove_all_choosers()
|
lobby.remove_all_choosers()
|
||||||
# get our next activity going..
|
|
||||||
|
# Get our next activity going.
|
||||||
self._complete_end_activity(activity, {})
|
self._complete_end_activity(activity, {})
|
||||||
else:
|
else:
|
||||||
_ba.screenmessage(Lstr(resource='notEnoughPlayersText',
|
_ba.screenmessage(Lstr(resource='notEnoughPlayersText',
|
||||||
@ -715,7 +720,7 @@ class Session:
|
|||||||
_ba.playsound(_ba.getsound('error'))
|
_ba.playsound(_ba.getsound('error'))
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
# otherwise just add players on the fly
|
# Otherwise just add players on the fly.
|
||||||
else:
|
else:
|
||||||
self._add_chosen_player(chooser)
|
self._add_chosen_player(chooser)
|
||||||
lobby.remove_chooser(chooser.getplayer())
|
lobby.remove_chooser(chooser.getplayer())
|
||||||
@ -735,17 +740,17 @@ class Session:
|
|||||||
activity = self._activity_weak()
|
activity = self._activity_weak()
|
||||||
assert activity is not None
|
assert activity is not None
|
||||||
|
|
||||||
# we need to reset the player's input here, as it is currently
|
# We need to reset the player's input here, as it is currently
|
||||||
# referencing the chooser which could inadvertently keep it alive
|
# referencing the chooser which could inadvertently keep it alive.
|
||||||
player.reset_input()
|
player.reset_input()
|
||||||
|
|
||||||
# pass it to the current activity if it has already begun
|
# Pass it to the current activity if it has already begun
|
||||||
# (otherwise it'll get passed once begin is called)
|
# (otherwise it'll get passed once begin is called).
|
||||||
pass_to_activity = (activity is not None and activity.has_begun()
|
pass_to_activity = (activity is not None and activity.has_begun()
|
||||||
and not activity.is_joining_activity)
|
and not activity.is_joining_activity)
|
||||||
|
|
||||||
# if we're not allowing mid-game joins, don't pass; just announce
|
# If we're not allowing mid-game joins, don't pass; just announce
|
||||||
# the arrival
|
# the arrival.
|
||||||
if pass_to_activity:
|
if pass_to_activity:
|
||||||
if not self._allow_mid_activity_joins:
|
if not self._allow_mid_activity_joins:
|
||||||
pass_to_activity = False
|
pass_to_activity = False
|
||||||
@ -756,8 +761,8 @@ class Session:
|
|||||||
]),
|
]),
|
||||||
color=(0, 1, 0))
|
color=(0, 1, 0))
|
||||||
|
|
||||||
# if we're a non-team game, each player gets their own team
|
# If we're a non-team game, each player gets their own team
|
||||||
# (keeps mini-game coding simpler if we can always deal with teams)
|
# (keeps mini-game coding simpler if we can always deal with teams).
|
||||||
if self._use_teams:
|
if self._use_teams:
|
||||||
team = chooser.get_team()
|
team = chooser.get_team()
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -34,7 +34,10 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
class OldWindow:
|
class OldWindow:
|
||||||
"""Temp for transitioning windows over to UILocationWindows."""
|
"""Temp for transitioning windows over to UILocationWindows.
|
||||||
|
|
||||||
|
Category: User Interface Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, root_widget: ba.Widget):
|
def __init__(self, root_widget: ba.Widget):
|
||||||
self._root_widget = root_widget
|
self._root_widget = root_widget
|
||||||
@ -112,7 +115,10 @@ class UIEntry:
|
|||||||
|
|
||||||
|
|
||||||
class UIController:
|
class UIController:
|
||||||
"""Wrangles UILocations."""
|
"""Wrangles UILocations.
|
||||||
|
|
||||||
|
Category: User Interface Classes
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,10 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#class_ba_Map">ba.Map</a></li>
|
<li><a href="#class_ba_Map">ba.Map</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<li><a href="#class_ba_Chooser">ba.Chooser</a></li>
|
||||||
<li><a href="#class_ba_InputDevice">ba.InputDevice</a></li>
|
<li><a href="#class_ba_InputDevice">ba.InputDevice</a></li>
|
||||||
<li><a href="#class_ba_Level">ba.Level</a></li>
|
<li><a href="#class_ba_Level">ba.Level</a></li>
|
||||||
|
<li><a href="#class_ba_Lobby">ba.Lobby</a></li>
|
||||||
<li><a href="#class_ba_Material">ba.Material</a></li>
|
<li><a href="#class_ba_Material">ba.Material</a></li>
|
||||||
<li><a href="#class_ba_Node">ba.Node</a></li>
|
<li><a href="#class_ba_Node">ba.Node</a></li>
|
||||||
<li><a href="#class_ba_Player">ba.Player</a></li>
|
<li><a href="#class_ba_Player">ba.Player</a></li>
|
||||||
@ -53,11 +55,10 @@
|
|||||||
<li><a href="#function_ba_printnodes">ba.printnodes()</a></li>
|
<li><a href="#function_ba_printnodes">ba.printnodes()</a></li>
|
||||||
<li><a href="#function_ba_setmusic">ba.setmusic()</a></li>
|
<li><a href="#function_ba_setmusic">ba.setmusic()</a></li>
|
||||||
<li><a href="#function_ba_sharedobj">ba.sharedobj()</a></li>
|
<li><a href="#function_ba_sharedobj">ba.sharedobj()</a></li>
|
||||||
|
<li><a href="#function_ba_show_damage_count">ba.show_damage_count()</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4><a name="class_category_General_Utility_Classes">General Utility Classes</a></h4>
|
<h4><a name="class_category_General_Utility_Classes">General Utility Classes</a></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#class_ba_App">ba.App</a></li>
|
|
||||||
<li><a href="#class_ba_AppConfig">ba.AppConfig</a></li>
|
|
||||||
<li><a href="#class_ba_Call">ba.Call</a></li>
|
<li><a href="#class_ba_Call">ba.Call</a></li>
|
||||||
<li><a href="#class_ba_Context">ba.Context</a></li>
|
<li><a href="#class_ba_Context">ba.Context</a></li>
|
||||||
<li><a href="#class_ba_ContextCall">ba.ContextCall</a></li>
|
<li><a href="#class_ba_ContextCall">ba.ContextCall</a></li>
|
||||||
@ -93,6 +94,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<h4><a name="class_category_Asset_Classes">Asset Classes</a></h4>
|
<h4><a name="class_category_Asset_Classes">Asset Classes</a></h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="#class_ba_AssetPackage">ba.AssetPackage</a></li>
|
||||||
<li><a href="#class_ba_CollideModel">ba.CollideModel</a></li>
|
<li><a href="#class_ba_CollideModel">ba.CollideModel</a></li>
|
||||||
<li><a href="#class_ba_Data">ba.Data</a></li>
|
<li><a href="#class_ba_Data">ba.Data</a></li>
|
||||||
<li><a href="#class_ba_Model">ba.Model</a></li>
|
<li><a href="#class_ba_Model">ba.Model</a></li>
|
||||||
@ -125,8 +127,19 @@
|
|||||||
<li><a href="#class_ba_StandMessage">ba.StandMessage</a></li>
|
<li><a href="#class_ba_StandMessage">ba.StandMessage</a></li>
|
||||||
<li><a href="#class_ba_ThawMessage">ba.ThawMessage</a></li>
|
<li><a href="#class_ba_ThawMessage">ba.ThawMessage</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<h4><a name="class_category_App_Classes">App Classes</a></h4>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#class_ba_Achievement">ba.Achievement</a></li>
|
||||||
|
<li><a href="#class_ba_App">ba.App</a></li>
|
||||||
|
<li><a href="#class_ba_AppConfig">ba.AppConfig</a></li>
|
||||||
|
<li><a href="#class_ba_AppDelegate">ba.AppDelegate</a></li>
|
||||||
|
<li><a href="#class_ba_Campaign">ba.Campaign</a></li>
|
||||||
|
<li><a href="#class_ba_MusicPlayer">ba.MusicPlayer</a></li>
|
||||||
|
</ul>
|
||||||
<h4><a name="class_category_User_Interface_Classes">User Interface Classes</a></h4>
|
<h4><a name="class_category_User_Interface_Classes">User Interface Classes</a></h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="#class_ba_OldWindow">ba.OldWindow</a></li>
|
||||||
|
<li><a href="#class_ba_UIController">ba.UIController</a></li>
|
||||||
<li><a href="#class_ba_UILocation">ba.UILocation</a></li>
|
<li><a href="#class_ba_UILocation">ba.UILocation</a></li>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#class_ba_UILocationWindow">ba.UILocationWindow</a></li>
|
<li><a href="#class_ba_UILocationWindow">ba.UILocationWindow</a></li>
|
||||||
@ -151,9 +164,12 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#class_ba_Dependency">ba.Dependency</a></li>
|
<li><a href="#class_ba_Dependency">ba.Dependency</a></li>
|
||||||
<li><a href="#class_ba_DependencyComponent">ba.DependencyComponent</a></li>
|
<li><a href="#class_ba_DependencyComponent">ba.DependencyComponent</a></li>
|
||||||
|
<li><a href="#class_ba_DependencySet">ba.DependencySet</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4><a name="class_category_Enums">Enums</a></h4>
|
<h4><a name="class_category_Enums">Enums</a></h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="#class_ba_MusicPlayMode">ba.MusicPlayMode</a></li>
|
||||||
|
<li><a href="#class_ba_MusicType">ba.MusicType</a></li>
|
||||||
<li><a href="#class_ba_Permission">ba.Permission</a></li>
|
<li><a href="#class_ba_Permission">ba.Permission</a></li>
|
||||||
<li><a href="#class_ba_SpecialChar">ba.SpecialChar</a></li>
|
<li><a href="#class_ba_SpecialChar">ba.SpecialChar</a></li>
|
||||||
<li><a href="#class_ba_TimeFormat">ba.TimeFormat</a></li>
|
<li><a href="#class_ba_TimeFormat">ba.TimeFormat</a></li>
|
||||||
@ -174,31 +190,15 @@
|
|||||||
<li><a href="#class_ba_WidgetNotFoundError">ba.WidgetNotFoundError</a></li>
|
<li><a href="#class_ba_WidgetNotFoundError">ba.WidgetNotFoundError</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
<h4><a name="class_category_Misc_Classes">Misc Classes</a></h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#class_ba_Achievement">ba.Achievement</a></li>
|
|
||||||
<li><a href="#class_ba_AppDelegate">ba.AppDelegate</a></li>
|
|
||||||
<li><a href="#class_ba_AssetPackage">ba.AssetPackage</a></li>
|
|
||||||
<li><a href="#class_ba_Campaign">ba.Campaign</a></li>
|
|
||||||
<li><a href="#class_ba_Chooser">ba.Chooser</a></li>
|
|
||||||
<li><a href="#class_ba_DependencySet">ba.DependencySet</a></li>
|
|
||||||
<li><a href="#class_ba_Lobby">ba.Lobby</a></li>
|
|
||||||
<li><a href="#class_ba_MusicPlayer">ba.MusicPlayer</a></li>
|
|
||||||
<li><a href="#class_ba_MusicPlayMode">ba.MusicPlayMode</a></li>
|
|
||||||
<li><a href="#class_ba_MusicType">ba.MusicType</a></li>
|
|
||||||
<li><a href="#class_ba_OldWindow">ba.OldWindow</a></li>
|
|
||||||
<li><a href="#class_ba_UIController">ba.UIController</a></li>
|
|
||||||
</ul>
|
|
||||||
<h4><a name="function_category_Misc_Functions">Misc Functions</a></h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#function_ba_show_damage_count">ba.show_damage_count()</a></li>
|
|
||||||
</ul>
|
|
||||||
<hr>
|
<hr>
|
||||||
<h2><strong><a name="class_ba_Achievement">ba.Achievement</a></strong></h3>
|
<h2><strong><a name="class_ba_Achievement">ba.Achievement</a></strong></h3>
|
||||||
<p><em><top level class></em>
|
<p><em><top level class></em>
|
||||||
</p>
|
</p>
|
||||||
<p>Represents attributes and state for an individual achievement.</p>
|
<p>Represents attributes and state for an individual achievement.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_App_Classes">App Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Attributes:</h3>
|
<h3>Attributes:</h3>
|
||||||
<h5><a href="#attr_ba_Achievement__complete">complete</a>, <a href="#attr_ba_Achievement__description">description</a>, <a href="#attr_ba_Achievement__description_complete">description_complete</a>, <a href="#attr_ba_Achievement__description_full">description_full</a>, <a href="#attr_ba_Achievement__description_full_complete">description_full_complete</a>, <a href="#attr_ba_Achievement__display_name">display_name</a>, <a href="#attr_ba_Achievement__hard_mode_only">hard_mode_only</a>, <a href="#attr_ba_Achievement__level_name">level_name</a>, <a href="#attr_ba_Achievement__name">name</a>, <a href="#attr_ba_Achievement__power_ranking_value">power_ranking_value</a></h5>
|
<h5><a href="#attr_ba_Achievement__complete">complete</a>, <a href="#attr_ba_Achievement__description">description</a>, <a href="#attr_ba_Achievement__description_complete">description_complete</a>, <a href="#attr_ba_Achievement__description_full">description_full</a>, <a href="#attr_ba_Achievement__description_full_complete">description_full_complete</a>, <a href="#attr_ba_Achievement__display_name">display_name</a>, <a href="#attr_ba_Achievement__hard_mode_only">hard_mode_only</a>, <a href="#attr_ba_Achievement__level_name">level_name</a>, <a href="#attr_ba_Achievement__name">name</a>, <a href="#attr_ba_Achievement__power_ranking_value">power_ranking_value</a></h5>
|
||||||
<dl>
|
<dl>
|
||||||
@ -709,7 +709,7 @@ likely result in errors.</p>
|
|||||||
</p>
|
</p>
|
||||||
<p>A class for high level app functionality and state.</p>
|
<p>A class for high level app functionality and state.</p>
|
||||||
|
|
||||||
<p>Category: <a href="#class_category_General_Utility_Classes">General Utility Classes</a></p>
|
<p>Category: <a href="#class_category_App_Classes">App Classes</a></p>
|
||||||
|
|
||||||
<p> Use ba.app to access the single shared instance of this class.</p>
|
<p> Use ba.app to access the single shared instance of this class.</p>
|
||||||
|
|
||||||
@ -909,7 +909,7 @@ to resume.</p>
|
|||||||
<p>inherits from: dict</p>
|
<p>inherits from: dict</p>
|
||||||
<p>A special dict that holds the game's persistent configuration values.</p>
|
<p>A special dict that holds the game's persistent configuration values.</p>
|
||||||
|
|
||||||
<p>Category: <a href="#class_category_General_Utility_Classes">General Utility Classes</a></p>
|
<p>Category: <a href="#class_category_App_Classes">App Classes</a></p>
|
||||||
|
|
||||||
<p> It also provides methods for fetching values with app-defined fallback
|
<p> It also provides methods for fetching values with app-defined fallback
|
||||||
defaults, applying contained values to the game, and committing the
|
defaults, applying contained values to the game, and committing the
|
||||||
@ -1003,6 +1003,9 @@ manually.</p>
|
|||||||
</p>
|
</p>
|
||||||
<p>Defines handlers for high level app functionality.</p>
|
<p>Defines handlers for high level app functionality.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_App_Classes">App Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Methods:</h3>
|
<h3>Methods:</h3>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><h4><a name="method_ba_AppDelegate__create_default_game_config_ui">create_default_game_config_ui()</a></dt></h4><dd>
|
<dt><h4><a name="method_ba_AppDelegate__create_default_game_config_ui">create_default_game_config_ui()</a></dt></h4><dd>
|
||||||
@ -1018,7 +1021,10 @@ when done.</p>
|
|||||||
<hr>
|
<hr>
|
||||||
<h2><strong><a name="class_ba_AssetPackage">ba.AssetPackage</a></strong></h3>
|
<h2><strong><a name="class_ba_AssetPackage">ba.AssetPackage</a></strong></h3>
|
||||||
<p>inherits from: <a href="#class_ba_DependencyComponent">ba.DependencyComponent</a></p>
|
<p>inherits from: <a href="#class_ba_DependencyComponent">ba.DependencyComponent</a></p>
|
||||||
<p>DependencyComponent representing a bundled package of game assets.</p>
|
<p><a href="#class_ba_DependencyComponent">ba.DependencyComponent</a> representing a bundled package of game assets.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_Asset_Classes">Asset Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Methods Inherited:</h3>
|
<h3>Methods Inherited:</h3>
|
||||||
<h5><a href="#method_ba_DependencyComponent__get_dynamic_deps">get_dynamic_deps()</a></h5>
|
<h5><a href="#method_ba_DependencyComponent__get_dynamic_deps">get_dynamic_deps()</a></h5>
|
||||||
@ -1119,6 +1125,9 @@ mycall()</pre>
|
|||||||
</p>
|
</p>
|
||||||
<p>Represents a unique set or series of <a href="#class_ba_Level">ba.Levels</a>.</p>
|
<p>Represents a unique set or series of <a href="#class_ba_Level">ba.Levels</a>.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_App_Classes">App Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Attributes:</h3>
|
<h3>Attributes:</h3>
|
||||||
<h5><a href="#attr_ba_Campaign__name">name</a>, <a href="#attr_ba_Campaign__sequential">sequential</a></h5>
|
<h5><a href="#attr_ba_Campaign__name">name</a>, <a href="#attr_ba_Campaign__sequential">sequential</a></h5>
|
||||||
<dl>
|
<dl>
|
||||||
@ -1187,7 +1196,10 @@ mycall()</pre>
|
|||||||
<h2><strong><a name="class_ba_Chooser">ba.Chooser</a></strong></h3>
|
<h2><strong><a name="class_ba_Chooser">ba.Chooser</a></strong></h3>
|
||||||
<p><em><top level class></em>
|
<p><em><top level class></em>
|
||||||
</p>
|
</p>
|
||||||
<p>A character/team selector for a single player.</p>
|
<p>A character/team selector for a <a href="#class_ba_Player">ba.Player</a>.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_Gameplay_Classes">Gameplay Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Attributes:</h3>
|
<h3>Attributes:</h3>
|
||||||
<h5><a href="#attr_ba_Chooser__lobby">lobby</a>, <a href="#attr_ba_Chooser__player">player</a>, <a href="#attr_ba_Chooser__ready">ready</a></h5>
|
<h5><a href="#attr_ba_Chooser__lobby">lobby</a>, <a href="#attr_ba_Chooser__player">player</a>, <a href="#attr_ba_Chooser__ready">ready</a></h5>
|
||||||
@ -1675,6 +1687,8 @@ on the dep config value. (for instance a map required by a game type)</p>
|
|||||||
<p>inherits from: <a href="#class_typing_Generic">typing.Generic</a></p>
|
<p>inherits from: <a href="#class_typing_Generic">typing.Generic</a></p>
|
||||||
<p>Set of resolved dependencies and their associated data.</p>
|
<p>Set of resolved dependencies and their associated data.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_Dependency_Classes">Dependency Classes</a></p>
|
||||||
|
|
||||||
<p> To use DependencyComponents, a set must be created, resolved, and then
|
<p> To use DependencyComponents, a set must be created, resolved, and then
|
||||||
loaded. The DependencyComponents are only valid while the set remains
|
loaded. The DependencyComponents are only valid while the set remains
|
||||||
in existence.
|
in existence.
|
||||||
@ -2571,7 +2585,10 @@ can be changed to separate its new high score lists/etc. from the old.</p>
|
|||||||
<h2><strong><a name="class_ba_Lobby">ba.Lobby</a></strong></h3>
|
<h2><strong><a name="class_ba_Lobby">ba.Lobby</a></strong></h3>
|
||||||
<p><em><top level class></em>
|
<p><em><top level class></em>
|
||||||
</p>
|
</p>
|
||||||
<p>Container for choosers.</p>
|
<p>Container for <a href="#class_ba_Chooser">ba.Choosers</a>.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_Gameplay_Classes">Gameplay Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Attributes:</h3>
|
<h3>Attributes:</h3>
|
||||||
<h5><a href="#attr_ba_Lobby__teams">teams</a>, <a href="#attr_ba_Lobby__use_team_colors">use_team_colors</a></h5>
|
<h5><a href="#attr_ba_Lobby__teams">teams</a>, <a href="#attr_ba_Lobby__use_team_colors">use_team_colors</a></h5>
|
||||||
@ -3072,6 +3089,8 @@ Use <a href="#function_ba_getmodel">ba.getmodel</a>() to instantiate one.</p>
|
|||||||
</p>
|
</p>
|
||||||
<p>Wrangles soundtrack music playback.</p>
|
<p>Wrangles soundtrack music playback.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_App_Classes">App Classes</a></p>
|
||||||
|
|
||||||
<p> Music can be played either through the game itself
|
<p> Music can be played either through the game itself
|
||||||
or via a platform-specific external player.
|
or via a platform-specific external player.
|
||||||
</p>
|
</p>
|
||||||
@ -3152,6 +3171,9 @@ signify that the default soundtrack should be used..</p>
|
|||||||
<p>inherits from: enum.Enum</p>
|
<p>inherits from: enum.Enum</p>
|
||||||
<p>Influences behavior when playing music.</p>
|
<p>Influences behavior when playing music.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_Enums">Enums</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Values:</h3>
|
<h3>Values:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>REGULAR</li>
|
<li>REGULAR</li>
|
||||||
@ -3162,6 +3184,9 @@ signify that the default soundtrack should be used..</p>
|
|||||||
<p>inherits from: enum.Enum</p>
|
<p>inherits from: enum.Enum</p>
|
||||||
<p>Types of music available to play in-game.</p>
|
<p>Types of music available to play in-game.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_Enums">Enums</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Values:</h3>
|
<h3>Values:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>MENU</li>
|
<li>MENU</li>
|
||||||
@ -3318,6 +3343,9 @@ acting as an alternative to setting node attributes.</p>
|
|||||||
</p>
|
</p>
|
||||||
<p>Temp for transitioning windows over to UILocationWindows.</p>
|
<p>Temp for transitioning windows over to UILocationWindows.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_User_Interface_Classes">User Interface Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Methods:</h3>
|
<h3>Methods:</h3>
|
||||||
<h5><a href="#method_ba_OldWindow____init__"><constructor></a>, <a href="#method_ba_OldWindow__get_root_widget">get_root_widget()</a></h5>
|
<h5><a href="#method_ba_OldWindow____init__"><constructor></a>, <a href="#method_ba_OldWindow__get_root_widget">get_root_widget()</a></h5>
|
||||||
<dl>
|
<dl>
|
||||||
@ -4694,6 +4722,9 @@ self.t = <a href="#class_ba_Timer">ba.Timer</a>(0.3, say_it, repeat=True)
|
|||||||
</p>
|
</p>
|
||||||
<p>Wrangles UILocations.</p>
|
<p>Wrangles UILocations.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#class_category_User_Interface_Classes">User Interface Classes</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3>Methods:</h3>
|
<h3>Methods:</h3>
|
||||||
<h5><a href="#method_ba_UIController____init__"><constructor></a>, <a href="#method_ba_UIController__show_main_menu">show_main_menu()</a></h5>
|
<h5><a href="#method_ba_UIController____init__"><constructor></a>, <a href="#method_ba_UIController__show_main_menu">show_main_menu()</a></h5>
|
||||||
<dl>
|
<dl>
|
||||||
@ -5738,6 +5769,8 @@ playing, the playing track will not be restarted.</p>
|
|||||||
|
|
||||||
<p>Pop up a damage count at a position in space.</p>
|
<p>Pop up a damage count at a position in space.</p>
|
||||||
|
|
||||||
|
<p>Category: <a href="#function_category_Gameplay_Functions">Gameplay Functions</a></p>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<h2><strong><a name="function_ba_textwidget">ba.textwidget()</a></strong></h3>
|
<h2><strong><a name="function_ba_textwidget">ba.textwidget()</a></strong></h3>
|
||||||
<p><span>textwidget(edit: Widget = None, parent: Widget = None,
|
<p><span>textwidget(edit: Widget = None, parent: Widget = None,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user