📄 season.c
字号:
/****************************************************************************** season.c -- ** Season management (scene changes basically)******************************************************************************/#include <g_sys.h>#include <g_key.h>#include <g_consts.h>#include "train.h"/*************************************************************************** ** season_change** Called discretely - when it is time to switch from one season* to another as specified by the caller*****************************************************************************/void season_change( Season newseason ){ static GV_Obi skydome = NULL; static GV_Obi train_town = NULL; static GV_Obi summer_time = NULL; static GV_Obi autumn_time = NULL; static GV_Obi winter_time = NULL; /* Save some handles */ if( !train_town ) { GV_obi_inq_by_name( "TRAIN_TOWN", &train_town ); GV_obi_inq_by_name_relative( train_town, ".../summer", &summer_time); GV_obi_inq_by_name_relative( train_town, ".../autumn", &autumn_time); GV_obi_inq_by_name_relative( train_town, ".../winter", &winter_time); GV_obi_inq_by_name( "SKYDOME", &skydome ); } /********************** Season control ******************************/ if( newseason == SEASON_SUMMER ) { GV_obi_set_state( summer_time, G_ON ); GV_obi_set_state( autumn_time, G_OFF ); GV_obi_set_state( winter_time, G_OFF ); GV_obi_set_state( skydome, G_ON ); } else if( newseason == SEASON_AUTUMN ) { GV_obi_set_state( summer_time, G_OFF ); GV_obi_set_state( autumn_time, G_ON ); GV_obi_set_state( winter_time, G_OFF ); GV_obi_set_state( skydome, G_OFF ); } else if( newseason == SEASON_WINTER ) { GV_obi_set_state( summer_time, G_OFF ); GV_obi_set_state( autumn_time, G_OFF ); GV_obi_set_state( winter_time, G_ON ); GV_obi_set_state( skydome, G_OFF ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -