Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/environments/mover_trigger_intervisibility.cc @ 10769

Last change on this file since 10769 was 10696, checked in by snellen, 18 years ago

added all the new mover classes

File size: 1.5 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2007 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Fabian 'x3n' Landau
13   co-programmer:
14*/
15
16#include "util/loading/load_param.h"
17#include "util/loading/factory.h"
18#include "mover_trigger_intervisibility.h"
19
20ObjectListDefinition(IntervisibilityTrigger);
21CREATE_FACTORY(IntervisibilityTrigger);
22
23
24IntervisibilityTrigger::IntervisibilityTrigger(const TiXmlElement* root)
25{
26    this->registerObject(this, IntervisibilityTrigger::_objectList);
27    this->toList(OM_ENVIRON);
28
29    this->onlyHumans = false;
30    this->onlyNPCs =  false;
31
32    if (root != NULL)
33        this->loadParams(root);
34
35    this->init_post_params();
36}
37
38void IntervisibilityTrigger::loadParams(const TiXmlElement* root)
39{
40    MoverTrigger::loadParams(root);
41
42    LoadParam(root, "onlyHumans", this, IntervisibilityTrigger, setOnlyHumans)
43        .describe("Only human players can release the trigger.")
44        .defaultValues(false);
45    LoadParam(root, "onlyNPCs", this, IntervisibilityTrigger, setOnlyNPCs)
46        .describe("Only NPCs can release the trigger.")
47        .defaultValues(false);
48}
49
50bool IntervisibilityTrigger::checkIsTriggered()
51{
52    /* TODO */
53    return false;
54}
Note: See TracBrowser for help on using the repository browser.