本文整理汇总了C++中entity类的典型用法代码示例。如果您正苦于以下问题:C++ entity类的具体用法?C++ entity怎么用?C++ entity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了entity类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ServerList_PingSort_Click
void ServerList_PingSort_Click(entity btn, entity me)
{
me.setSortOrder(me, SLIST_FIELD_PING, +1);
}
开发者ID:VenFPS,项目名称:Vengeance,代码行数:4,代码来源:serverlist.c
示例2: MapList_None
void MapList_None(entity btn, entity me)
{
cvar_set("g_maplist", "");
me.refilter(me);
}
开发者ID:Bader14,项目名称:Nexuiz,代码行数:5,代码来源:maplist.c
示例3: NexuizMapList_loadCvars
void NexuizMapList_loadCvars(entity me)
{
me.refilter(me);
}
开发者ID:Bader14,项目名称:Nexuiz,代码行数:4,代码来源:maplist.c
示例4: XonoticCvarsDialog_fill
void XonoticCvarsDialog_fill(entity me)
{
entity e, cvarlist, btn;
cvarlist = makeXonoticCvarList();
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Cvar filter:"));
me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0'));
me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
e.onChange = CvarList_Filter_Change;
e.onChangeEntity = cvarlist;
btn.onClick = InputBox_Clear_Click;
btn.onClickEntity = e;
cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
me.TR(me);
me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
me.gotoRC(me, me.rows - 7, 0);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Setting:"));
me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
cvarlist.cvarNameBox = e;
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Type:"));
me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
cvarlist.cvarTypeBox = e;
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Value:"));
me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
cvarlist.cvarValueBox = e;
e.onChange = CvarList_Value_Change;
e.onChangeEntity = cvarlist;
me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON));
cvarlist.cvarDefaultBox = e;
e.onClick = CvarList_Revert_Click;
e.onClickEntity = cvarlist;
e.allowCut = 1;
e.marginLeft = e.marginRight = 0.5;
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Description:"));
me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
cvarlist.cvarDescriptionBox = e;
e.allowWrap = 1;
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
开发者ID:VenFPS,项目名称:Vengeance,代码行数:45,代码来源:dialog_settings_misc_cvars.c
示例5: XonoticServerCreateTab_fill
void XonoticServerCreateTab_fill(entity me)
{
entity e, e0;
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Game type:")));
me.TR(me);
me.TD(me, 8, 3, e = makeXonoticGametypeList());
me.TR(me);
me.TR(me);
me.TR(me);
me.TR(me);
me.TR(me);
me.TR(me);
me.TR(me);
me.TR(me);
//me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Match settings:"))); // pointless, overcrowds the dialog imo
me.TR(me);
me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 1, "timelimit_override");
me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, _("Time limit:")));
me.TD(me, 1, 2, me.sliderTimelimit);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderTimelimit, _("Use map specified default")));
me.TR(me);
me.sliderFraglimit = makeXonoticSlider(1.0, 2000.0, 5, "fraglimit_override");
me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderFraglimit, _("Point limit:")));
me.checkboxFraglimit = e;
me.TD(me, 1, 2, me.sliderFraglimit);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, _("Use map specified default")));
me.checkboxFraglimitMapinfo = e;
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player slots:")));
me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers"));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Number of bots:")));
me.TD(me, 1, 2, makeXonoticSlider(0, 9, 1, "bot_number"));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bot skill:")));
setDependent(e, "bot_number", 0, -1);
me.TD(me, 1, 2, e = makeXonoticTextSlider("skill"));
e.addValue(e, _("Botlike"), "0");
e.addValue(e, _("Beginner"), "1");
e.addValue(e, _("You will win"), "2");
e.addValue(e, _("You can win"), "3");
e.addValue(e, _("You might win"), "4");
e.addValue(e, _("Advanced"), "5");
e.addValue(e, _("Expert"), "6");
e.addValue(e, _("Pro"), "7");
e.addValue(e, _("Assassin"), "8");
e.addValue(e, _("Unhuman"), "9");
e.addValue(e, _("Godlike"), "10");
e.configureXonoticTextSliderValues(e);
setDependent(e, "bot_number", 0, -1);
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticButton(_("Mutators..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.mutatorsDialog;
main.mutatorsDialog.refilterEntity = me.mapListBox;
me.TD(me, 1, 2, e0 = makeXonoticTextLabel(0, string_null));
e0.textEntity = main.mutatorsDialog;
e0.allowCut = 1;
me.TR(me);
me.TDempty(me, 0.5);
me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.advancedDialog;
main.advancedDialog.refilterEntity = me.mapListBox;
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
me.mapListBox = makeXonoticMapList();
me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Map list:")));
makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
me.TR(me);
me.TD(me, me.rows - 4, 3, me.mapListBox);
me.gotoRC(me, me.rows - 3, 3.5);
me.TDempty(me, 0.25);
me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select all"), '0 0 0'));
e.onClick = MapList_All;
e.onClickEntity = me.mapListBox;
me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select none"), '0 0 0'));
e.onClick = MapList_None;
e.onClickEntity = me.mapListBox;
me.TDempty(me, 0.25);
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Multiplayer!"), '0 0 0'));
e.onClick = MapList_LoadMap;
e.onClickEntity = me.mapListBox;
me.mapListBox.startButton = e;
me.gameTypeChangeNotify(me);
}
开发者ID:kasymovga,项目名称:xonotic-nexmod,代码行数:96,代码来源:dialog_multiplayer_create.c
示例6: mouseDragNexuizCharmap
float mouseDragNexuizCharmap(entity me, vector coords)
{
return me.mouseMove(me, coords);
}
开发者ID:ZeusInTraining,项目名称:edu2,代码行数:4,代码来源:charmap.c
示例7: Dialog_TDNoMargin
void Dialog_TDNoMargin(entity me, float rowspan, float colspan, entity e, vector v)
{
me.addItemSimple(me, me.currentRow, me.currentColumn, rowspan, colspan, e, v);
me.currentColumn += colspan;
}
开发者ID:aspotton,项目名称:xonotic-data-patches,代码行数:5,代码来源:dialog.c
示例8: fillNexuizInputSettingsTab
void fillNexuizInputSettingsTab(entity me)
{
entity e;
entity kb;
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Key bindings:"));
me.TR(me);
me.TD(me, me.rows - 2, 3, kb = makeNexuizKeyBinder());
me.gotoRC(me, me.rows - 1, 0);
me.TR(me);
me.TD(me, 1, 1, e = makeNexuizButton("Change key...", '0 0 0'));
e.onClick = KeyBinder_Bind_Change;
e.onClickEntity = kb;
kb.keyGrabButton = e;
me.TD(me, 1, 1, e = makeNexuizButton("Edit...", '0 0 0'));
e.onClick = KeyBinder_Bind_Edit;
e.onClickEntity = kb;
kb.userbindEditButton = e;
kb.userbindEditDialog = main.userbindEditDialog;
main.userbindEditDialog.keybindBox = kb;
me.TD(me, 1, 1, e = makeNexuizButton("Clear", '0 0 0'));
e.onClick = KeyBinder_Bind_Clear;
e.onClickEntity = kb;
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Sensitivity:"));
me.TD(me, 1, 2, e = makeNexuizSlider(1, 32, 0.2, "sensitivity"));
me.TR(me);
me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "UI mouse speed:"));
me.TD(me, 1, 2, e = makeNexuizSlider(0.2, 4.0, 0.1, "menu_mouse_speed"));
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "m_filter", "Mouse filter"));
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(1.022, "m_pitch", "Invert mouse"));
me.TR(me);
if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE)
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "joy_enable", "Use joystick input"));
else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE)
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "joystick", "Use joystick input"));
me.TR(me);
if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE)
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "vid_dgamouse", "Turn off OS mouse acceleration"));
else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE)
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "apple_mouse_noaccel", "Turn off OS mouse acceleration"));
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "con_closeontoggleconsole", "\"enter console\" also closes"));
me.TR(me);
me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Show binds:"));
me.TD(me, 1, 2, e = makeNexuizTextSlider("sbar_showbinds"));
e.addValue(e, "Actions", "0");
e.addValue(e, "Bound keys", "1");
e.addValue(e, "Both", "2");
e.configureNexuizTextSliderValues(e);
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBoxEx(2, 0, "cl_showpressedkeys", "Show pressed keys"));
}
开发者ID:Exaeta,项目名称:RocketMinsta,代码行数:57,代码来源:dialog_settings_input.c
示例9: entity_collides_with_entity
bool entity_collides_with_entity(const entity& e, const entity& other, collision_info* info)
{
if((e.solid_dimensions()&other.weak_solid_dimensions()) == 0 &&
(e.weak_solid_dimensions()&other.solid_dimensions()) == 0) {
return false;
}
const rect& our_rect = e.solid_rect();
const rect& other_rect = other.solid_rect();
if(!rects_intersect(our_rect, other_rect)) {
return false;
}
if(other.destroyed()) {
return false;
}
const rect area = intersection_rect(our_rect, other_rect);
const solid_info* our_solid = e.solid();
const solid_info* other_solid = other.solid();
assert(our_solid && other_solid);
const frame& our_frame = e.current_frame();
const frame& other_frame = other.current_frame();
for(int y = area.y(); y <= area.y2(); ++y) {
for(int x = area.x(); x < area.x2(); ++x) {
const int our_x = e.face_right() ? x - e.x() : (e.x() + our_frame.width()-1) - x;
const int our_y = y - e.y();
if(our_solid->solid_at(our_x, our_y, info ? &info->area_id : NULL)) {
const int other_x = other.face_right() ? x - other.x() : (other.x() + other_frame.width()-1) - x;
const int other_y = y - other.y();
if(other_solid->solid_at(other_x, other_y, info ? &info->collide_with_area_id : NULL)) {
return true;
}
}
}
}
return false;
}
开发者ID:AsKorysti,项目名称:anura,代码行数:43,代码来源:collision_utils.cpp
示例10: process
void process(const entity& e) {
particle_generation_ += generation_rate_millis_;
particles_.erase(std::remove_if(particles_.begin(), particles_.end(), particle_destroyed), particles_.end());
for(std::vector<particle>::iterator p = particles_.begin();
p != particles_.end(); ++p) {
p->pos_x += p->velocity_x;
p->pos_y += p->velocity_y;
if(e.face_right()) {
p->velocity_x += info_.accel_x/1000.0;
} else {
p->velocity_x -= info_.accel_x/1000.0;
}
p->velocity_y += info_.accel_y/1000.0;
p->rgba[0] += info_.rgba_delta[0];
p->rgba[1] += info_.rgba_delta[1];
p->rgba[2] += info_.rgba_delta[2];
p->rgba[3] += info_.rgba_delta[3];
p->ttl--;
}
while(particle_generation_ >= 1000) {
//std::cerr << "PARTICLE X ORIGIN: " << pos_x_;
particles_.push_back(particle());
particle& p = particles_.back();
p.ttl = info_.time_to_live;
if(info_.time_to_live_max != info_.time_to_live) {
p.ttl += rand()%(info_.time_to_live_max - info_.time_to_live);
}
p.velocity_x = info_.velocity_x;
p.velocity_y = info_.velocity_y;
if(info_.velocity_x_rand) {
p.velocity_x += rand()%info_.velocity_x_rand;
}
if(info_.velocity_y_rand) {
p.velocity_y += rand()%info_.velocity_y_rand;
}
p.pos_x = e.x()*1024 + pos_x_;
p.pos_y = e.y()*1024 + pos_y_;
if(pos_x_rand_) {
p.pos_x += rand()%pos_x_rand_;
}
if(pos_y_rand_) {
p.pos_y += rand()%pos_y_rand_;
}
p.rgba[0] = info_.rgba[0];
p.rgba[1] = info_.rgba[1];
p.rgba[2] = info_.rgba[2];
p.rgba[3] = info_.rgba[3];
if(info_.rgba_rand[0]) {
p.rgba[0] += rand()%info_.rgba_rand[0];
}
if(info_.rgba_rand[1]) {
p.rgba[1] += rand()%info_.rgba_rand[1];
}
if(info_.rgba_rand[2]) {
p.rgba[2] += rand()%info_.rgba_rand[2];
}
if(info_.rgba_rand[3]) {
p.rgba[3] += rand()%info_.rgba_rand[3];
}
particle_generation_ -= 1000;
}
}
开发者ID:jamesjrg,项目名称:frogatto-vs,代码行数:77,代码来源:particle_system.cpp
示例11: fillNexuizRadarDialog
void fillNexuizRadarDialog(entity me)
{
entity e, sl;
me.TR(me);
me.TD(me, 1, 4, makeNexuizTextLabel(0, "Radar settings:"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Position:"));
me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0 0", "Top left"));
me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0.5 0", "Top middle"));
me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "1 0", "Top right"));
me.TR(me);
me.TDempty(me, 1);
me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0 0.5", "Middle left"));
me.TDempty(me, 1);
me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "1 0.5", "Middle right"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Size:"));
me.TD(me, 1, 3, e = makeNexuizTextSlider("cl_teamradar_size"));
e.addValue(e, "96x96", "96 96");
e.addValue(e, "128x96", "128 96");
e.addValue(e, "128x128", "128 128");
e.addValue(e, "192x144", "192 144");
e.addValue(e, "192x192", "192 192");
e.addValue(e, "256x192", "256 192");
e.addValue(e, "256x256", "256 256");
e.configureNexuizTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
sl = makeNexuizSlider(0.20, 1, 0.01, "cl_teamradar_background_alpha");
me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1, 1, sl, "Background:"));
me.TD(me, 1, 3, sl);
me.TR(me);
me.TR(me);
me.TD(me, 1, 4, makeNexuizTextLabel(0, "HUD settings:"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizCheckBoxEx(100, 110, "viewsize", "Background:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_alpha_bg"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default red:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_r"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default green:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_g"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default blue:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_b"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Team color:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0.1, 1, 0.01, "sbar_color_bg_team"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TR(me);
me.TD(me, 1, 4, makeNexuizTextLabel(0, "Waypoint settings:"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 3.8, e = makeNexuizCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Waypoint scale:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
setDependent(e, "cl_hidewaypoints", 0, 0);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Waypoint alpha:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0.1, 1, 0.01, "g_waypointsprite_alpha"));
setDependent(e, "cl_hidewaypoints", 0, 0);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Show names:"));
me.TD(me, 1, 3, e = makeNexuizTextSlider("cl_shownames"));
e.addValue(e, "Never", "0");
e.addValue(e, "Teammates", "1");
e.addValue(e, "All players", "2");
e.configureNexuizTextSliderValues(e);
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
开发者ID:Exaeta,项目名称:RocketMinsta,代码行数:90,代码来源:dialog_multiplayer_playersetup_radar.c
示例12: ServerList_PlayerSort_Click
void ServerList_PlayerSort_Click(entity btn, entity me)
{
me.setSortOrder(me, SLIST_FIELD_NUMHUMANS, -1);
}
开发者ID:VenFPS,项目名称:Vengeance,代码行数:4,代码来源:serverlist.c
示例13: ServerList_MapSort_Click
void ServerList_MapSort_Click(entity btn, entity me)
{
me.setSortOrder(me, SLIST_FIELD_MAP, -1); // why?
}
开发者ID:VenFPS,项目名称:Vengeance,代码行数:4,代码来源:serverlist.c
示例14: ServerList_NameSort_Click
void ServerList_NameSort_Click(entity btn, entity me)
{
me.setSortOrder(me, SLIST_FIELD_NAME, -1); // why?
}
开发者ID:VenFPS,项目名称:Vengeance,代码行数:4,代码来源:serverlist.c
示例15: fillNexuizServerInfoDialog
void fillNexuizServerInfoDialog(entity me)
{
entity e;
me.TR(me);
me.TD(me, 1, me.columns, e = makeNexuizTextLabel(0.5, ""));
e.colorL = SKINCOLOR_SERVERINFO_NAME;
e.allowCut = 1;
me.nameLabel = e;
me.TR(me);
me.TD(me, 1, me.columns, e = makeNexuizTextLabel(0.5, ""));
e.colorL = SKINCOLOR_SERVERINFO_IP;
e.allowCut = 1;
me.cnameLabel = e;
me.TR(me);
me.TD(me, 1, 5.5, e = makeNexuizTextLabel(0, "Players:"));
me.TR(me);
me.TD(me, me.rows - 4, 6, e = makeNexuizPlayerList());
me.rawPlayerList = e;
me.gotoRC(me, 1, 6.25); me.setFirstColumn(me, me.currentColumn);
me.TR(me);
me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Type:"));
me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
e.allowCut = 1;
me.typeLabel = e;
me.TR(me);
me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Map:"));
me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
e.allowCut = 1;
me.mapLabel = e;
me.TR(me);
me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Players:"));
me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
e.allowCut = 1;
me.numPlayersLabel = e;
me.TR(me);
me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Bots:"));
me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
e.allowCut = 1;
me.numBotsLabel = e;
me.TR(me);
me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Mod:"));
me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
e.allowCut = 1;
me.modLabel = e;
me.TR(me);
me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Version:"));
me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
e.allowCut = 1;
me.versionLabel = e;
me.TR(me);
me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Ping:"));
me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
e.allowCut = 1;
me.pingLabel = e;
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns - 6, e = makeNexuizButton("OK", '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
me.TD(me, 1, me.columns - 6, e = makeNexuizButton("Join!", '0 0 0'));
e.onClick = Join_Click;
e.onClickEntity = me;
}
开发者ID:psychcf-nexuiz,项目名称:nexuiz-classbased,代码行数:67,代码来源:dialog_multiplayer_join_serverinfo.c
示例16: place_entity_in_level
bool place_entity_in_level(level& lvl, entity& e)
{
if(e.editor_force_standing()) {
if(!e.move_to_standing(lvl, 128)) {
return false;
}
}
if(!entity_collides(lvl, e, MOVE_NONE)) {
return true;
}
if(!entity_collides(lvl, e, MOVE_UP)) {
while(entity_collides(lvl, e, MOVE_NONE)) {
e.set_pos(e.x(), e.y()-1);
if(entity_collides(lvl, e, MOVE_UP)) {
return false;
}
}
return true;
}
if(!entity_collides(lvl, e, MOVE_DOWN)) {
while(entity_collides(lvl, e, MOVE_NONE)) {
e.set_pos(e.x(), e.y()+1);
if(entity_collides(lvl, e, MOVE_DOWN)) {
return false;
}
}
return true;
}
if(!entity_collides(lvl, e, MOVE_LEFT)) {
while(entity_collides(lvl, e, MOVE_NONE)) {
e.set_pos(e.x()-1, e.y());
if(entity_collides(lvl, e, MOVE_LEFT)) {
return false;
}
}
return true;
}
if(!entity_collides(lvl, e, MOVE_RIGHT)) {
while(entity_collides(lvl, e, MOVE_NONE)) {
e.set_pos(e.x()+1, e.y());
if(entity_collides(lvl, e, MOVE_RIGHT)) {
return false;
}
}
return true;
}
return false;
}
开发者ID:AsKorysti,项目名称:anura,代码行数:58,代码来源:collision_utils.cpp
示例17: configureNexuizCharmapNexuizCharmap
void configureNexuizCharmapNexuizCharmap(entity me, entity theTextbox)
{
me.controlledTextbox = theTextbox;
me.configureImage(me, me.image);
}
开发者ID:ZeusInTraining,项目名称:edu2,代码行数:5,代码来源:charmap.c
示例18: point_standable
bool point_standable(const level& lvl, const entity& e, int x, int y, collision_info* info, ALLOW_PLATFORM allow_platform)
{
if(allow_platform == SOLID_AND_PLATFORMS && lvl.standable(x, y, info ? &info->surf_info : NULL) ||
allow_platform != SOLID_AND_PLATFORMS && lvl.solid(x, y, info ? &info->surf_info : NULL)) {
if(info) {
info->read_surf_info();
}
if(info && !lvl.solid(x, y)) {
info->platform = true;
}
return true;
}
const point pt(x, y);
const std::vector<entity_ptr>& chars = lvl.get_solid_chars();
for(std::vector<entity_ptr>::const_iterator i = chars.begin();
i != chars.end(); ++i) {
const entity_ptr& obj = *i;
if(&e == obj.get()) {
continue;
}
if(allow_platform == SOLID_AND_PLATFORMS || obj->solid_platform()) {
const rect& platform_rect = obj->platform_rect_at(pt.x);
if(point_in_rect(pt, platform_rect) && obj->platform()) {
if(info) {
info->collide_with = obj;
info->friction = obj->surface_friction();
info->traction = obj->surface_traction();
info->adjust_y = y - platform_rect.y();
info->platform = !obj->solid_platform();
}
return true;
}
}
if((e.weak_solid_dimensions()&obj->solid_dimensions()) == 0 &&
(e.solid_dimensions()&obj->weak_solid_dimensions()) == 0) {
continue;
}
if(!point_in_rect(pt, obj->solid_rect())) {
continue;
}
const frame& f = obj->current_frame();
const int xpos = obj->face_right() ? x - obj->x() : obj->x() + f.width() - x - 1;
const solid_info* solid = obj->solid();
if(solid && solid->solid_at(x - obj->x(), y - obj->y(), info ? &info->collide_with_area_id : NULL)) {
if(info) {
info->collide_with = obj;
info->friction = obj->surface_friction();
info->traction = obj->surface_traction();
}
return true;
}
}
return false;
}
开发者ID:AsKorysti,项目名称:anura,代码行数:67,代码来源:collision_utils.cpp
示例19: Dialog_TD
void Dialog_TD(entity me, float rowspan, float colspan, entity e)
{
me.addItemSimple(me, me.currentRow, me.currentColumn, rowspan, colspan, e, '0 0 0');
me.currentColumn += colspan;
}
开发者ID:aspotton,项目名称:xonotic-data-patches,代码行数:5,代码来源:dialog.c
示例20: configureNexuizTextSliderValuesNexuizTextSlider
void configureNexuizTextSliderValuesNexuizTextSlider(entity me)
{
me.configureTextSliderValues(me, string_null);
me.loadCvars(me);
}
开发者ID:atphalix,项目名称:nexuiz,代码行数:5,代码来源:textslider.c
注:本文中的entity类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论