VoltAir
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Groups
Pages
logics
GameInputLogic.h
1
/*
2
* Copyright (C) 2014 Google Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef INPUTLOGIC_H
18
#define INPUTLOGIC_H
19
20
#include <Engine/Logic.h>
21
27
class
GameInputLogic
:
public
Logic
{
28
Q_OBJECT
29
public
:
34
GameInputLogic
(
QObject
*
parent
=
nullptr
);
35
36
virtual
void
init
()
override
;
37
42
virtual
void
update
()
override
;
43
};
44
Q_DECLARE_METATYPE(
GameInputLogic
*)
45
46
#endif // INPUTLOGIC_H
GameInputLogic::GameInputLogic
GameInputLogic(QObject *parent=nullptr)
Constructs a GameInputLogic.
GameInputLogic::update
virtual void update() override
Polls the global state of the controller identified by the parent Actor::PlayerActor's playerId and u...
GameInputLogic
Logic that synchronously polls global controller state and changes the parent Actor's inputForce and ...
Definition:
GameInputLogic.h:27
QObject
Logic
Non-visual entities in the QML item tree that define behavior for their parent Actor.
Definition:
Logic.h:31
GameInputLogic::init
virtual void init() override
Performs initialization of this Logic.
QObject::parent
QObject * parent() const