Skip to content

Instantly share code, notes, and snippets.

@NNNIC
Created August 13, 2018 06:51
Show Gist options
  • Save NNNIC/42b88016c12bf9f281d9f5d9ee02beff to your computer and use it in GitHub Desktop.
Save NNNIC/42b88016c12bf9f281d9f5d9ee02beff to your computer and use it in GitHub Desktop.
psgg unity enumulator sample
:output=MainControl_created.cs
::tempfunc=template-func.txt
:enc=utf-8
::
using System;
using System.Collections;
public partial class MainControl {
public string m_cur = null;
public string m_next = null;
public void Start()
{
m_cur = "S_START";
}
public bool IsEnd()
{
return (m_cur == "S_END");
}
IEnumerator Loop()
{
while(true)
{
var bFirst = false;
if (m_next != null)
{
m_cur = m_next;
m_next = null;
bFirst = true;
}
if (m_cur == null)
{
;
}
$contents2$
yield return null;
}
}
}
:output=MainControl_created.cs
::tempfunc=template-func.txt
:enc=utf-8
::
using System;
using System.Collections;
public partial class MainControl {
public string m_cur = null;
public string m_next = null;
public void Start()
{
m_cur = "S_START";
}
public bool IsEnd()
{
return (m_cur == "S_END");
}
IEnumerator Loop()
{
while(true)
{
var bFirst = false;
if (m_next != null)
{
m_cur = m_next;
m_next = null;
bFirst = true;
}
if (m_cur == null)
{
;
}
$contents2$
yield return null;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment