------------------------------------------
-- 함수
function add1(a,b)
return a+b;
end
-- 함수 : local, global 있다
local function add2(a,b)
return a+b
end
-- 함수 : 변수에 할당 가능
local fn_add3 = function(a, b)
return a^b
end
print(fn_add3(10, 2))
-- 함수... 를 실행하면 fn1()만 무한 실행된다.
--[[
local _b = true
local function fn1()
while _b do
print("OK")
end
print("END
e language GML and we give an overview of all the functions and variables available to control all aspects of your game.
====== Function List ======
The following sections all detail the many different functions that are available to you when using GML. They h... ve been split into different groups of associated functions and, where necessary, have been cross referenced
?php
class News_model extends CI_Model {
public function __construct() {
$this->load->database();
}
... ]]에 동작하도록 되어 있다. 아래의 코드를 추가한다.
<code php>
public function get_news( $slug = FALSE )
{
if( $slug == FALSE ... <?php
class News extends CI_Controller {
public function __construct() {
paret::__construct();
$th... ('news_model');
} // 컨트롤러가 모델을 사용하는구나.
public function index() {
$data['news'] = $this->news_model->
ct's position(move it along the predefined angle)
function GameLoop()
{
movingObject.x = movingObject.x + ... ct's position(move it along the predefined angle)
function GameLoop()
{
// continously add acceleration to... ach frame call game loop to set object's position
function GameLoop()
{
if( moving == true ) {
velocit... = time * gravity * 0.5f
코드 예제
<code javascript>
function GameLoop()
{
if( thrown == true && moving == fa
LSL**을 그대로 사용한답니다.
====== 작동 ======
* surface function을 작성
* 계산 결과물을 저장할 SurfaceOutput 에 값을 채워줌
Surfa... rface ..%%** 부분은,
<code>
#pragma surface <surfaceFunction> <lightModel> <[optionalparams]>
</code>
* surfaceFunction : 어느 함수가 셰이더 코드를 갖고 있는지 알려줘야 한다. <code>
void surf... = Texture Bump Diffuse =====
Bump 맵을 받아서, surfaceFunction에서 사용하는 방법 확이
<code>
Shader "Study/TextureBumpDif