当前位置: 首页>>代码示例>>PHP>>正文


PHP city::aps方法代码示例

本文整理汇总了PHP中city::aps方法的典型用法代码示例。如果您正苦于以下问题:PHP city::aps方法的具体用法?PHP city::aps怎么用?PHP city::aps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在city的用法示例。


在下文中一共展示了city::aps方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fopen

<?php

include "./slotFunctions.php";
include '/cityClass.php';
echo '
<script>
useDeskTop.newPane("rscWork");
var thisDiv = useDeskTop.getPane("rscWork");
console.log("add to " + thisDiv);
</script>';
$unitFile = fopen($gamePath . '/unitDat.dat', 'rb');
echo 'Filed opened';
fseek($unitFile, $postVals[1] * $defaultBlockSize);
$rscPoint = unpack('i*', fread($unitFile, 400));
$baseCity = new city([intval($rscPoint[15]), $unitFile]);
echo 'Loaded city data: (' . $baseCity->cityData[1] . ')<br>';
echo $baseCity->aps() . ' points available.';
include '../gameScripts/1061-1.php';
//print_r($baseCity->cityData);
//fclose($unitFile);
开发者ID:rwruss,项目名称:ib3,代码行数:20,代码来源:1102.php

示例2: fopen

//$cityDat = unpack('i*', fread($unitFile, $unitBlockSize));
$slotFile = fopen($gamePath . '/gameSlots.slt', 'rb');
$credList = array_filter(unpack("i*", readSlotData($slotFile, $thisCity->cityData[19], 40)));
$approved = checkCred($pGameID, $credList);
//$approved = array_search($pGameID, $credList);
echo 'Approved level ' . $approved . '<br>';
if ($approved) {
    echo 'Unit Details for unit ' . $unitID . '<br>
	  Type: ' . $thisCity->cityData[4] . '<br>
	  Owner: ' . $thisCity->cityData[5] . '<br>
	  Controller: ' . $thisCity->cityData[6] . '<br>
	  Status: ' . $thisCity->cityData[7] . '<br>
	  Space: ' . $thisCity->cityData[8] . '<br>
	  Map Object ID ' . $thisCity->cityData[23] . '<br>
		Population ' . $thisCity->cityData[25] . '<br>
		Action Points ' . $thisCity->aps() . '
	  <div style="position:absolute; bottom:220; left:0;" onclick="makeBox(\'rscSummary\', 1068, 500, 500, 200, 50);">Leave Town</div>
	  <div style="position:absolute; bottom:200; left:0;" onclick="makeBox(\'rscSummary\', 1063, 500, 500, 200, 50);">Show Resources</div>
	  <div style="position:absolute; bottom:180; left:0;" onclick="scrMod(1047);">City Buildings</div>
	  <div style="position:absolute; bottom:160; left:0;" onclick="makeBox(\'unit\', 2001, 500, 500, 200, 50);">Add Resources</div>
	  <div style="position:absolute; bottom:140; left:0;" onclick="scrMod(1029,' . $unitID . ');">City Projects</div>
	  <div style="position:absolute; bottom:120; left:0;" onclick="makeBox(\'cityMan\', 1021, 500, 500, 200, 50);">Characters Present</div>
	  <div style="position:absolute; bottom:100; left:0;" onclick="makeBox(\'cityProd\', 1022, 500, 500, 200, 50);">Manage Production</div>


	  <div style="position:absolute; bottom:80; left:0;" onclick="makeBox(\'garrison\', 1042, 500, 500, 200, 50);">Garrison at town</div>
	  <div style="position:absolute; bottom:60; left:0;" onclick="makeBox(\'unit\', 1020, 500, 500, 200, 50);">Run an external script</div>
	  <div style="position:absolute; bottom:40; left:0;" onclick="setClick([' . $unitID . ',1],\'progress\')">Move to Loc</div>
	  <div style="position:absolute; bottom:20; left:0;" onclick="scrMod(\'1018,' . $unitID . '\', \'scrBox\');">show Move</div>

		<div style="position:absolute; bottom:240; left:0;" onclick="scrMod(\'1130,' . $unitID . '\', \'scrBox\');">Make my primary city</div>
开发者ID:rwruss,项目名称:ib3,代码行数:31,代码来源:obj_1.php


注:本文中的city::aps方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。