godot-cpp-utils-docs/html/classutils_1_1IPlayer.html

158 lines
9.4 KiB
HTML

<!-- HTML header for doxygen 1.9.7-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>godot-cpp-utils: utils::IPlayer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link rel="search" href="search_opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="godot-cpp-utils"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">godot-cpp-utils
</div>
<div id="projectbrief">A collection of utility classes, functions and macros for use with Godot and GDExtension.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,true,'search.php','Search');
$(document).ready(function() {
if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
});
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classutils_1_1IPlayer.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classutils_1_1IPlayer-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">utils::IPlayer Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">
<p>Interface required for player nodes.
<a href="classutils_1_1IPlayer.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="player_8hpp_source.html">player.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0cafb35522002c12a00da6cb408e462c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classutils_1_1IPlayer.html#a0cafb35522002c12a00da6cb408e462c">setup_player_input</a> (<a class="el" href="classutils_1_1PlayerInput.html">PlayerInput</a> *input)=0</td></tr>
<tr class="memdesc:a0cafb35522002c12a00da6cb408e462c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by <a class="el" href="classutils_1_1GameRoot3D.html" title="The root of a game.">GameRoot3D</a> when this player is instantiated or assigned a new <a class="el" href="classutils_1_1PlayerInput.html" title="An event-driven input observer.">PlayerInput</a>. <br /></td></tr>
<tr class="separator:a0cafb35522002c12a00da6cb408e462c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee51a05e36995e6523c3284b5cef1f42"><td class="memItemLeft" align="right" valign="top"><a id="aee51a05e36995e6523c3284b5cef1f42" name="aee51a05e36995e6523c3284b5cef1f42"></a>
virtual gd::Node *&#160;</td><td class="memItemRight" valign="bottom"><b>to_node</b> ()=0</td></tr>
<tr class="memdesc:aee51a05e36995e6523c3284b5cef1f42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert <a class="el" href="classutils_1_1IPlayer.html" title="Interface required for player nodes.">IPlayer</a> instance to node. <br /></td></tr>
<tr class="separator:aee51a05e36995e6523c3284b5cef1f42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5e2d0a33a4114e45b2bd1bea95fa1db"><td class="memItemLeft" align="right" valign="top"><a id="aa5e2d0a33a4114e45b2bd1bea95fa1db" name="aa5e2d0a33a4114e45b2bd1bea95fa1db"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>spawn_at_position</b> (gd::Transform3D const &amp;at)=0</td></tr>
<tr class="memdesc:aa5e2d0a33a4114e45b2bd1bea95fa1db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Spawn the player at a given transform, usually the global transform of a <a class="el" href="classutils_1_1SpawnPoint3D.html" title="A location in the game world that the player can spawn at.">SpawnPoint3D</a>. <br /></td></tr>
<tr class="separator:aa5e2d0a33a4114e45b2bd1bea95fa1db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad697b5e89246178d99a4c281eaf313af"><td class="memItemLeft" align="right" valign="top"><a id="ad697b5e89246178d99a4c281eaf313af" name="ad697b5e89246178d99a4c281eaf313af"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>get_player_id</b> ()</td></tr>
<tr class="memdesc:ad697b5e89246178d99a4c281eaf313af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the player id assigned to this instance. <br /></td></tr>
<tr class="separator:ad697b5e89246178d99a4c281eaf313af"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface required for player nodes. </p>
<p>Use multiple inheritance and implement <a class="el" href="classutils_1_1IPlayer.html" title="Interface required for player nodes.">IPlayer</a> to make a regular node usable as a player with <a class="el" href="classutils_1_1GameRoot3D.html" title="The root of a game.">GameRoot3D</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a0cafb35522002c12a00da6cb408e462c" name="a0cafb35522002c12a00da6cb408e462c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0cafb35522002c12a00da6cb408e462c">&#9670;&#160;</a></span>setup_player_input()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void utils::IPlayer::setup_player_input </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classutils_1_1PlayerInput.html">PlayerInput</a> *&#160;</td>
<td class="paramname"><em>input</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Called by <a class="el" href="classutils_1_1GameRoot3D.html" title="The root of a game.">GameRoot3D</a> when this player is instantiated or assigned a new <a class="el" href="classutils_1_1PlayerInput.html" title="An event-driven input observer.">PlayerInput</a>. </p>
<p>Use <a class="el" href="classutils_1_1PlayerInput.html#a52f0f96cd4732ce06016459094d3a714" title="Start listening for action.">PlayerInput::listen_to</a> to register input callbacks. There's no need to keep the input pointer around. As the instance is managed by the <a class="el" href="classutils_1_1GameRoot3D.html" title="The root of a game.">GameRoot3D</a>. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="player_8hpp_source.html">player.hpp</a></li>
<li>player.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><b>utils</b></li><li class="navelem"><a class="el" href="classutils_1_1IPlayer.html">IPlayer</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7 </li>
</ul>
</div>
</body>
</html>