HoverRace  2.0
TrackPeer.h
Go to the documentation of this file.
1 
2 // TrackPeer.h
3 //
4 // Copyright (c) 2014-2016 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "../../../engine/Script/Peer.h"
25 
26 namespace HoverRace {
27  namespace Model {
28  class Track;
29  }
30  namespace Script {
31  class Core;
32  }
33  namespace Util {
34  class Clock;
35  }
36 }
37 
38 namespace HoverRace {
39 namespace Client {
40 namespace HoverScript {
41 
46 class TrackPeer : public Script::Peer
47 {
49 
50 public:
51  TrackPeer(Script::Core &scripting, std::shared_ptr<Model::Track> track);
52  virtual ~TrackPeer() { }
53 
54 public:
55  static void Register(Script::Core &scripting);
56 
57 public:
58  const std::string &LGetDescription() const;
59  void LGetBounds() const;
60  double LGetGravity() const;
61  void LSetGravity(double gravity);
62  const std::string &LGetName() const;
63 
64 private:
65  std::shared_ptr<Model::Track> track;
66 };
67 
68 } // namespace HoverScript
69 } // namespace Client
70 } // namespace HoverRace
Scripting peer for the currently-played track.
Definition: TrackPeer.h:46
std::shared_ptr< Model::Track > track
Definition: TrackPeer.h:65
Base class for script peers.
Definition: Peer.h:47
Definition: Announcement.h:24
virtual ~TrackPeer()
Definition: TrackPeer.h:52
A script environment.
Definition: Core.h:66