• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# STEP类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中STEP的典型用法代码示例。如果您正苦于以下问题:C# STEP类的具体用法?C# STEP怎么用?C# STEP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



STEP类属于命名空间,在下文中一共展示了STEP类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
				}
			}
		}
	}
开发者ID:fotoco,项目名称:006772,代码行数:35,代码来源:TitleControl.cs


示例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");
            }
        }
开发者ID:nguyenvanduocit,项目名称:AutoAddmefast,代码行数:34,代码来源:frmMain.cs


示例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;
     }
 }
开发者ID:kjhsch0326,项目名称:006757,代码行数:29,代码来源:SceneControl.cs


示例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つでも得るものがあると幸いです.
        // --------------------------------------------.
    }
开发者ID:smalab,项目名称:JumpGame,代码行数:28,代码来源:unitoControl.cs


示例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;
     }
 }
开发者ID:smalab,项目名称:JumpGame,代码行数:29,代码来源:SceneControl.cs


示例6: start

	public override void	start()
	{
		this.next_step = STEP.MOVE;

		// この敵が狙うプレイヤーを決定する
		// ひとまず一番最初に決まったプレイヤーにする
		focus = GameObject.FindGameObjectWithTag ("Player");
	}
开发者ID:fotoco,项目名称:006772,代码行数:8,代码来源:chrBehaviorEnemyMinato.cs


示例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;
    }
开发者ID:kjhsch0326,项目名称:006757,代码行数:11,代码来源:GameRoot.cs


示例8: Start

    void Start()
    {
        curr_step = STEP.PLAY; // ���¸� ����������

        initializeScore();

        _scoreText = GetComponentInChildren<Text>();

        _scoreText.fontSize = (int)(_scoreText.fontSize * ((Screen.width) / 1236f));
    }
开发者ID:ShinWonYoung,项目名称:HGU-SE-15,代码行数:10,代码来源:Score.cs


示例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;
    }
开发者ID:DmaInNewZealand,项目名称:DoubleColorBall,代码行数:12,代码来源:OniControl.cs


示例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로.
    }
开发者ID:kjhsch0326,项目名称:006757,代码行数:12,代码来源:SceneControl.cs


示例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に.
    }
开发者ID:smalab,项目名称:JumpGame,代码行数:12,代码来源:SceneControl.cs


示例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;
        }
    }
开发者ID:tsato1,项目名称:Ramen-Master,代码行数:51,代码来源:DragScript.cs


示例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;
        }
    }
开发者ID:smalab,项目名称:JumpGame,代码行数:47,代码来源:treeControl.cs


示例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);
		}
	}
开发者ID:fotoco,项目名称:006772,代码行数:24,代码来源:TitleControl.cs


示例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;
	}
开发者ID:fotoco,项目名称:006772,代码行数:62,代码来源:chrBehaviorEnemyLairMinato.cs


示例16: start

	public override void	start()
	{
		this.next_step = STEP.WAIT;
	}
开发者ID:fotoco,项目名称:006772,代码行数:4,代码来源:chrBehaviorEnemyLairMinato.cs


示例17: onVanished

	// やられたときに呼ばれる.
	public override void		onVanished()
	{
		this.next_step = STEP.VANISH;
	}
开发者ID:fotoco,项目名称:006772,代码行数:5,代码来源:chrBehaviorEnemyLairMinato.cs


示例18: Update

    void Update()
    {
        this.get_input(); // 입력 정보를 가져온다.

        this.step_timer += Time.deltaTime;

        float eat_time = 0.5f; // 사과는 2초 걸려서 먹는다. // 2.0f→0.5f.

        float repair_time = 0.5f; // 수리에 걸리는 시간도 2초.// 2.0f→0.5f.

        // 상태를 변화시킨다 --------------------.
        if(this.next_step == STEP.NONE) { // 다음 예정이 없으면.
            switch(this.step) {
            case STEP.MOVE: // '이동중'상태의 처리.
                do {
                    if(! this.key.action) { // 액션키가 눌려있지 않으면.
                        break; // 루프 탈출.
                    }

                    // 주목 중인 이벤트가 있을 때.
                    if(this.closest_event != null) {
                        if(! this.is_event_ignitable()) { // 이벤트가 시작 불가면.
                            break; // 아무것도 하지 않는다.
                        }
                        // 이벤트 종류 취득.
                        Event.TYPE ignitable_event =
                            this.event_root.getEventType(this.closest_event);
                        switch(ignitable_event) {
                        case Event.TYPE.ROCKET:
                            // 이벤트 종류가 ROCKET이면.
                            // REPAIRING(수리) 상태로 이행.
                            this.next_step = STEP.REPAIRING;
                            break;
                        }
                        break;
                    }

                    if(this.carried_item != null) {
                        // 들고 있는 아이템 판별.
                        Item.TYPE carried_item_type =
                            this.item_root.getItemType(this.carried_item);
                        switch(carried_item_type) {
                        case Item.TYPE.APPLE: // 사과.
                        case Item.TYPE.PLANT: // 식물.
                            // '식사중'상태로 이행.
                            this.next_step = STEP.EATING;
                            break;
                        }
                    }
                } while(false);
                break;
            case STEP.EATING: // '식사중' 상태의 처리.
                if(this.step_timer > eat_time) { // 2초 대기.
                    this.next_step = STEP.MOVE; // '이동' 상태로 이행.
                }
                break;

            case STEP.REPAIRING: // '수리중' 상태의 처리.
                if(this.step_timer > repair_time) { // 2초 대기.
                    this.next_step = STEP.MOVE; //  '이동' 상태로 이행.
                }
                break;

            }
        }

        // 상태가 변화한 경우------------.
        while(this.next_step != STEP.NONE) { // 상태가 NONE이외 = 상태가 변화했다.
            this.step = this.next_step;
            this.next_step = STEP.NONE;
            switch(this.step) {
            case STEP.MOVE:
                break;
            case STEP.EATING: // '식사 중' 상태의 처리.
                if(this.carried_item != null) {
                    // 들고 있는 아이템의 '체력 회복 정도'를 가져와서 설정.
                    this.game_status.addSatiety(
                        this.item_root.getRegainSatiety(this.carried_item));

                    // 들고 있는 아이템은 폐기..
                    GameObject.Destroy(this.carried_item);
                    this.carried_item = null;
                }
                break;
            case STEP.REPAIRING: // '수리 중'이 되었다면.
                if(this.carried_item != null) {
                    // 들고 있는 아이템의 '수리 진척 상태'를 가져와서 설정.
                    this.game_status.addRepairment(
                        this.item_root.getGainRepairment(this.carried_item));

                    // 들고 있는 아이템을 삭제.
                    GameObject.Destroy(this.carried_item);
                    this.carried_item = null;
                    this.closest_item = null;
                }
                break;
            }
            this.step_timer = 0.0f;
        }

//.........这里部分代码省略.........
开发者ID:kjhsch0326,项目名称:006757,代码行数:101,代码来源:PlayerControl.cs


示例19: 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;

            case STEP.CLEAR:
                if(eff_clear_pos_y <=0.0f){
                    if(Input.GetMouseButtonDown(0)) {
                        // this.next_step = STEP.RESULT;
                        this.next_step = STEP.CLICK_ACTION;
                    }
                }
                break;

            case STEP.CLICK_ACTION:
                if(this.step_timer > ACTION_TIME) {
                    this.next_step = STEP.RESULT;
                }
                break;

            }
        }

        // ---------------------------------------------------------------- //
        // 状態が遷移したときの初期化.

        while(this.next_step != STEP.NONE) {

            this.step      = this.next_step;
            this.next_step = STEP.NONE;

            switch(this.step) {
            case STEP.PLAY:
                this.sound_control.playBgm(Sound.BGM.BGM1);
                break;

            case STEP.CLEAR:
                // ブロックの入れ替えなどをできないように.
                this.block_root.enabled = false;
                this.clear_time = this.step_timer;
                Debug.Log(this.step_timer +"/"+ this.clear_time);
                this.sound_control.stopBgm();
                eff_clear_pos_y = 32.0f;
                this.rocket_motion.Play("02_launchingstart");

                this.sound_control.playSound(Sound.SOUND.GAME_CLEAR);

                break;

            case STEP.CLICK_ACTION:
                this.rocket_motion.Play("03_launching");
                this.sound_control.playSound(Sound.SOUND.CLICK);
                break;

            case STEP.RESULT:
                // ブロックの入れ替えなどをできないように.
                this.block_root.enabled = false;
                int ignit = this.score_counter.bestIgnit();
                Debug.Log("CLEAR TIME= "+ this.clear_time);
                GlobalParam.getInstance().setLastScore( this.clear_time, ignit);
                Application.LoadLevel("resultScene");
                break;
            }

            this.step_timer = 0.0f;
        }

        // ---------------------------------------------------------------- //
        // 各状態での実行処理.

        switch(this.step) {
        case STEP.PLAY:
            break;
        case STEP.CLEAR:

            break;
        }

        // ---------------------------------------------------------------- //
    }
开发者ID:smalab,项目名称:JumpGame,代码行数:93,代码来源:SceneControl.cs


示例20: Update

    // Update is called once per frame
    void Update()
    {
        Vector3		velocity = this.GetComponent<Rigidbody>().velocity;

        // ---------------------------------------------------------------- //
        // 클릭 후의 경과 시간.
        //
        // 착지 직후에 버튼을 클릭해도 캐릭터가 점프해 주지 않는 경우가 있다.
        // 원인은 착지 직후에 버턴을 클릭했다고 생각하지만 실제로는
        // 착지 직전에 클릭하기 때문이다.
        // 이런 때라도 점프할 수 있도록 '클릭한 순간'의 판정이
        // 몇 프레임에 이어지도록 한다.
        //
        if(Input.GetMouseButtonDown(0)) {

            this.click_timer = 0.0f;

        } else {

            if(this.click_timer >= 0.0f) {

                this.click_timer += Time.deltaTime;
            }
        }

        // ---------------------------------------------------------------- //
        // 스피드 컨트롤.

        this.current_speed = this.level_control.getPlayerSpeed();

        // --------------------------------------------------------------- //
        // 유니티 처리 엔진의 특성?으로 바닥 블록의 이음메에서 울퉁불퉁 뛰어오르므로
        // 억지로 아래로 눌러 붙인다.

        if(this.step == STEP.TOUCH_ENEMY) {

        } else {

            if(this.is_colided) {

                if(velocity.y > Physics.gravity.y*Time.deltaTime) {

                    velocity.y = Physics.gravity.y*Time.deltaTime;

                    this.GetComponent<Rigidbody>().velocity = velocity;
                }
            }

            // '착지했는가?' 조사한다.
            // (원래는 유니티의 기능을 사용하면 충분하지만 밀어내기로
            //  공중에 떠버리는 경우도 있으니 각자 조사한다).
            //
            this.check_landed();
        }

        // ---------------------------------------------------------------- //
        // 화면 아래로 떨어지면 실패.

        switch(this.step) {

            case STEP.RUN:
            case STEP.JUMP:
            {
                if(this.transform.position.y < NARAKU_HEIGHT) {

                    this.next_step = STEP.MISS;
                }
            }
            break;
        }

        // ---------------------------------------------------------------- //
        // 스텝 내의 경과 시간을 진행한다.

        this.step_timer += Time.deltaTime;

        // ---------------------------------------------------------------- //
        // 다음 상태로 이동할지 검사한다.

        if(this.next_step == STEP.NONE) {

            switch(this.step) {

                case STEP.RUN:
                {
                    // 마우스의 왼쪽 버튼이 눌렸으면 점프.
                    if(0.0f <= this.click_timer && this.click_timer <= CLICK_GRACE_TIME) {

                        if(this.is_landed || this.is_colided) {

                            this.click_timer = -1.0f;
                            this.next_step = STEP.JUMP;

                        } else {

                            // 발밑에 바닥이 없을 때는 점프할 수 없다.
                        }
                    }
                }
//.........这里部分代码省略.........
开发者ID:BaobabDuncan,项目名称:006757,代码行数:101,代码来源:PlayerControl.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# STGMEDIUM类代码示例发布时间:2022-05-24
下一篇:
C# STATE类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap