本文整理汇总了C#中STEP类的典型用法代码示例。如果您正苦于以下问题:C# STEP类的具体用法?C# STEP怎么用?C# STEP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
STEP类属于命名空间,在下文中一共展示了STEP类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// ================================================================ //
// MonoBehaviour에서 상속.
void Start()
{
this.step = STEP.NONE;
this.next_step = STEP.WAIT;
GlobalParam.getInstance().fadein_start = true;
if(!TitleControl.is_single) {
#if true
this.m_serverAddress = "";
// 호스트 이름을 얻는다.
string hostname = Dns.GetHostName();
// 호스트 이름에서 IP주소를 얻는다.
IPAddress[] adrList = Dns.GetHostAddresses(hostname);
m_serverAddress = adrList[0].ToString();
#endif
GameObject obj = GameObject.Find("Network");
if (obj == null) {
obj = new GameObject ("Network");
}
if (m_network == null) {
m_network = obj.AddComponent<Network>();
if (m_network != null) {
DontDestroyOnLoad(m_network);
}
}
}
}
示例2: btnCheckBef_Click
private void btnCheckBef_Click(object sender, EventArgs e)
{
preStep = STEP.OPENLINK;
string html = wbAddmefast.DocumentText;
Match match = Regex.Match(html, @"confirmSingleFB\((.*?)\);", RegexOptions.IgnoreCase);
if (match.Success)
{
string parms = match.Groups[1].Value;
string[] parmArr = parms.Split(',');
_Id = parmArr[0];
_url = Uri.EscapeUriString(parmArr[1].Split('"')[1]);
_linkID = parmArr[2].Split('"')[1];
_network = parmArr[3].Split('"')[1];
_code = Uri.UnescapeDataString(parmArr[5].Split('"')[1]);
_Cpc = parmArr[6].Split('"')[1];
_Title = parmArr[7].Split('"')[1];
getFBLikesBef(_Id, _url, _network);
}
else
{
MessageBox.Show("Not match getFBLikesBef");
}
match = Regex.Match(html, @"open\('(.*?)'\);", RegexOptions.IgnoreCase);
if (match.Success)
{
string[] parmArr = match.Groups[1].Value.Split(',');
_openLinkUrl = parmArr[0].Substring(0, parmArr[0].Length - 1);
}
else
{
MessageBox.Show("Not match Open popup");
}
}
示例3: Update
void Update()
{
this.step_timer += Time.deltaTime;
// 상태 변화 대기 -----.
if(this.next_step == STEP.NONE) {
switch(this.step) {
case STEP.PLAY:
// 클리어 조건을 만족하면.
if(this.score_counter.isGameClear()) {
this.next_step = STEP.CLEAR; // 클리어 상태로 이행.
}
break;
}
}
// 상태가 변화했다면 ------.
while(this.next_step != STEP.NONE) {
this.step = this.next_step;
this.next_step = STEP.NONE;
switch(this.step) {
case STEP.CLEAR:
// block_root를 정지.
this.block_root.enabled = false;
// 경과 시간을 클리어 시간으로 설정.
this.clear_time = this.step_timer;
break;
}
this.step_timer = 0.0f;
}
}
示例4: Start
void Start()
{
this.unito_motion = this.transform.GetComponentInChildren<Animation>(); //motion.
this.sound_control = GameObject.Find("SoundRoot").GetComponent<SoundControl>();
this.effect_control = GameObject.Find("GameRoot").gameObject.GetComponent<VanishEffectControl>();
this.count_repair_eff = REPAIR_EFF_TIMING;
this.count_repair_se = REPAIR_SE_TIMING;
next_step = STEP.IDLE;
// --------------------------------------------.
// たまーに頭の上に花が咲く!.
int rnd = Random.Range(0, 9);
if(rnd > 5){
GameObject go = GameObject.Instantiate(this.hana_prefab) as GameObject;
go.transform.parent = unitoAtama;
go.transform.position = unitoAtama.position;
go.transform.localScale = Vector3.one;
}
// --------------------------------------------.
// 2014.06.16.
// そろそろ完成版の実装も終わりに近づいてきた.
// 原稿の修正も終わり,カバーも決まり.
// 発売日が近づいてくる中,ちょっとどきどきしながら時を過ごしています.
// この本を買ってもらえた事は本当に嬉しく,何か1つでも得るものがあると幸いです.
// --------------------------------------------.
}
示例5: Update
void Update()
{
this.step_timer += Time.deltaTime;
// 状態変化待ち-----.
if(this.next_step == STEP.NONE) {
switch(this.step) {
case STEP.PLAY:
// クリア条件を満たしていたら.
if(this.score_counter.isGameClear()) {
this.next_step = STEP.CLEAR; // クリア状態に移行.
}
break;
}
}
// 状態が変化したら------.
while(this.next_step != STEP.NONE) {
this.step = this.next_step;
this.next_step = STEP.NONE;
switch(this.step) {
case STEP.CLEAR:
// block_rootを停止.
this.block_root.enabled = false;
// 経過時間をクリア時間として設定.
this.clear_time = this.step_timer;
break;
}
this.step_timer = 0.0f;
}
}
示例6: start
public override void start()
{
this.next_step = STEP.MOVE;
// この敵が狙うプレイヤーを決定する
// ひとまず一番最初に決まったプレイヤーにする
focus = GameObject.FindGameObjectWithTag ("Player");
}
示例7: Start
// ================================================================ //
// MonoBehaviour에서 상속.
void Start()
{
this.player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>();
this.score_control = this.gameObject.GetComponent<ScoreControl>();
this.sound_control = GameObject.Find("SoundRoot").GetComponent<SoundControl>();
this.next_step = STEP.PLAY;
}
示例8: Start
void Start()
{
curr_step = STEP.PLAY; // ���¸� ����������
initializeScore();
_scoreText = GetComponentInChildren<Text>();
_scoreText.fontSize = (int)(_scoreText.fontSize * ((Screen.width) / 1236f));
}
示例9: AttackedFromPlayer
// 攻撃を受けたときの処理を開始する.
public void AttackedFromPlayer(Vector3 blowout, Vector3 angular_velocity)
{
this.blowout_vector = blowout;
this.blowout_angular_velocity = angular_velocity;
// 親子関係を外しておく.
// 親(OniGroup)が削除されるといっしょに削除されてしまうので.
this.transform.parent = null;
this.next_step = STEP.DEFEATED;
}
示例10: Start
void Start()
{
// BlockRoot스크립트 가져오기.
this.block_root = this.gameObject.GetComponent<BlockRoot>();
// BlockRoot스크립트의 initialSetUp()을 호출한다.
this.block_root.initialSetUp();
// ScoreCounter 가져오기
this.score_counter = this.gameObject.GetComponent<ScoreCounter>();
this.next_step = STEP.PLAY; // 다음 상태를 '플레이 중'으로.
this.guistyle.fontSize = 24; // 폰트 크기를 24로.
}
示例11: Start
void Start()
{
// BlockRootスクリプトを取得.
this.block_root = this.gameObject.GetComponent<BlockRoot>();
// BlockRootスクリプトのinitialSetUp()を呼び出す.
this.block_root.initialSetUp();
// ScoreCounterを取得.
this.score_counter = this.gameObject.GetComponent<ScoreCounter>();
this.next_step = STEP.PLAY; // 次の状態を「プレイ中」に.
this.guistyle.fontSize = 24; // フォントのサイズを24に.
}
示例12: Update
// Update is called once per frame
void Update()
{
// state change
switch (step)
{
case STEP.IDLE:
if (this.isDrag)
{
this.stepNext = STEP.DRAGGING;
}
break;
case STEP.DRAGGING:
if (!this.isDrag)
{
this.stepNext = STEP.IDLE;
}
break;
}
// state transition
while (this.stepNext != STEP.NONE)
{
this.step = this.stepNext;
this.stepNext = STEP.NONE;
switch (this.step)
{
case STEP.DRAGGING:
print("start drag" + this.name);
this.beginDragging();
break;
case STEP.IDLE:
print("end drag" + this.name);
break;
}
}
// execute each state job
switch (this.step)
{
case STEP.DRAGGING:
this.doDragging();
break;
}
}
示例13: Update
void Update()
{
this.step_timer += Time.deltaTime;
// 変化待ち------.
if(this.next_step == STEP.NONE){
switch(this.step){
case STEP.GLOW:
// ぐんぐん成長する--------.
glow_timer += Time.deltaTime;
if(glow_timer >= GLOW_TREE_TIME){
this.next_step = STEP.TREE;
}
break;
}
}
// 変化時------.
while(this.next_step != STEP.NONE) {
this.step = this.next_step;
this.next_step = STEP.NONE;
switch(this.step){
case STEP.GLOW:
break;
case STEP.TREE:
break;
}
}
// 繰返し----.
switch(step){
case STEP.GLOW:
float size = Mathf.Lerp(0.2f, 0.8f, this.glow_timer/GLOW_TREE_TIME);
this.transform.localScale = Vector3.one*size;
break;
case STEP.TREE:
// 定期的にリンゴを作り出す--------.
respawn_timer_apple += Time.deltaTime;
if(respawn_timer_apple > RESPAWN_TIME_APPLE){
respawn_timer_apple = 0.0f;
this.respawnApple();
}
break;
}
}
示例14: Start
// ================================================================ //
// MonoBehaviour에서 상속.
void Start()
{
this.step = STEP.NONE;
this.next_step = STEP.WAIT;
GlobalParam.getInstance().fadein_start = true;
// 호스트 이름을 취득합니다.
this.hostAddress = "";
string hostname = Dns.GetHostName();
// 호스트 이름에서 IP 주소를 가져옵니다.
IPAddress[] adrList = Dns.GetHostAddresses(hostname);
hostAddress = adrList[0].ToString();
GameObject obj = new GameObject("Network");
if (obj != null) {
network_ = obj.AddComponent<Network>();
network_.RegisterReceiveNotification(PacketId.GameSyncInfo, OnReceiveSyncGamePacket);
}
}
示例15: execute
public override void execute()
{
if (isPaused) {
return;
}
// ---------------------------------------------------------------- //
// ステップ内の経過時間を進める.
this.step_timer_prev = this.step_timer;
this.step_timer += Time.deltaTime;
// ---------------------------------------------------------------- //
// 次の状態に移るかどうかを、チェックする.
if(this.next_step == STEP.NONE) {
switch(this.step) {
case STEP.WAIT:
if (step_timer >= SPAWN_INTERVAL)
{
this.next_step = STEP.SPAWN;
}
break;
default:
break;
}
}
// ---------------------------------------------------------------- //
// 状態が遷移したときの初期化.
while(this.next_step != STEP.NONE) {
this.step = this.next_step;
this.next_step = STEP.NONE;
switch(this.step) {
default:
break;
}
this.step_timer_prev = 0.0f;
this.step_timer = 0.0f;
}
// ---------------------------------------------------------------- //
// 各状態での実行処理.
switch (this.step) {
case STEP.SPAWN:
getMyController().createEnemy ();
this.next_step = STEP.WAIT;
break;
default:
break;
}
// ---------------------------------------------------------------- //
this.damage_trigger = false;
}