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


C# Spawner类代码示例

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


Spawner类属于命名空间,在下文中一共展示了Spawner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OpenAndSpawnByName

 public void OpenAndSpawnByName(string passengerName, Spawner.TicketAdditionMode ticketMode)
 {
     _animator.enabled = true;
     _animator.Play("doors_open");
     _unitSpawner.Spawn(gameObject, passengerName, ticketMode);
     _isOpened = true;
 }
开发者ID:Xakkar,项目名称:zerotram,代码行数:7,代码来源:DoorsAnimationController.cs

示例2: Awake

 void Awake()
 {
     Application.targetFrameRate = 60;
     player = GameObject.Find("Player").GetComponent<Player>();
     spawner = GameObject.Find("Spawner").GetComponent<Spawner>();
     Score = Hud.GetComponent<Score>();
 }
开发者ID:kobayashi-taichi,项目名称:hello-world,代码行数:7,代码来源:Scene.cs

示例3: Start

 void Start()
 {
     _spawner = FindObjectOfType<Spawner>();
     targetRoom = _spawner._rooms[Random.Range(0, _spawner._rooms.Count)];
     destination = targetRoom.transform.position;
     transform.position = targetRoom.transform.up*50f + targetRoom.transform.position;
 }
开发者ID:kyledobitz,项目名称:barely-survived,代码行数:7,代码来源:Asteroid.cs

示例4: BeginGame

 private void BeginGame()
 {
     if (SpawnerPrefab != null) {
         _spawnerInstance = Instantiate(SpawnerPrefab) as Spawner;
         _spawnerInstance.Spawn();
     }
 }
开发者ID:lemanou,项目名称:PCG_2016,代码行数:7,代码来源:GameManager.cs

示例5: Init

    public override void Init(Spawner spawner)
    {
        base.Init(spawner);

        VFX.Instance.ParentEffectIf("fire", transform, new Vector2(-0.85f, 1.7f), -Mathf.PI / 2, IsShooting);
        VFX.Instance.ParentEffectIf("fire", transform, new Vector2(0.75f, 1.7f), -Mathf.PI / 2, IsShooting);
    }
开发者ID:dgarkavenko,项目名称:yet-another-applicant-s-space-game,代码行数:7,代码来源:Machinegun.cs

示例6: Awake

 //private bool WeaponToggle;
 void Awake()
 {
     floor = GameObject.Find ("Foreground");
     spawner = GameObject.Find ("Spawner").GetComponent<Spawner> ();
     //weaponmanager = GameObject.Find ("WeaponManager").GetComponent<WeaponManager>();
     timeManager = GetComponent<TimeManager> ();
 }
开发者ID:drezy,项目名称:SuperZombieRunner,代码行数:8,代码来源:GameManager.cs

示例7: Start

	void Start () 
    {                
        gmc = GameObject.FindGameObjectWithTag("GameController").GetComponent<Spawner>();
        print(gmc.sprites[gmc.num]);
		/*anim = GameObject.FindGameObjectsWithTag("animation");
		anim.SetActive(false);*/
		skeletonAnimation = GameObject.FindGameObjectWithTag("animation").GetComponent<SkeletonAnimation>();
		skeletonAnimation.enabled = true;
		gmv = GameObject.FindGameObjectWithTag("GameOver");
		cnt = GameObject.FindGameObjectWithTag("animation");
		//gmv.SetActive(false);
		gameOv =GameObject.FindGameObjectWithTag("GameOver").GetComponent<SkeletonAnimation>();
		if(this.gameObject.GetComponent<TapCounter>().enabled){
			skeletonAnimation.state.SetAnimation(0, "tap_amount_in", false);
			skeletonAnimation.state.AddAnimation(0, "tap_amount_loop", true, 0.3f);
		}
		gmv.SetActive(false);
		cnt.SetActive(true);

		/*gmv = GameObject.FindGameObjectWithTag("GameOver");
		cnt = GameObject.FindGameObjectWithTag("animation");
		gmv.SetActive(false);*/
        AudioSource[] sources = GetComponents<AudioSource>();
        tap = sources[0];
        bad = sources[1];
        good = sources[2];

		spw = GameObject.FindGameObjectWithTag("GameController").GetComponent<Spawner>();
		sc = GameObject.FindGameObjectWithTag("Score").GetComponent<ScoreController>();
		scoreCounter.text = "";

	}
开发者ID:Ankharia,项目名称:SpeedRun,代码行数:32,代码来源:TapCounter.cs

示例8: Start

    void Start()
    {
        //Load the given objects from ressource folder, for later use
        player = Resources.Load("Spaceships/Player", typeof(GameObject)) as GameObject;
        pilotAI = Resources.Load("Spaceships/PlayerAI", typeof(GameObject)) as GameObject;
        spawner = Resources.Load("Spawner", typeof(GameObject)) as GameObject;
        combatHUD = Resources.Load("HUD/CombatHUD", typeof(GameObject)) as GameObject;
        enemy = Resources.Load("Enemy", typeof(GameObject)) as GameObject;
        enemyHUD = Resources.Load("HUD/EnemyHUD", typeof(GameObject)) as GameObject;
        playerHUD = Resources.Load("HUD/PlayerHUD", typeof(GameObject)) as GameObject;

        //Types of drops
        commonDrop = Resources.Load("Drops/CommonDrop", typeof(GameObject)) as GameObject;
        uncommonDrop = Resources.Load("Drops/UncommonDrop", typeof(GameObject)) as GameObject;
        rareDrop = Resources.Load("Drops/RareDrop", typeof(GameObject)) as GameObject;
        healthDrop = Resources.Load("Drops/HealthDrop", typeof(GameObject)) as GameObject;
        shieldDrop = Resources.Load("Drops/ShieldDrop", typeof(GameObject)) as GameObject;
        powerDrop = Resources.Load("Drops/PowerDrop", typeof(GameObject)) as GameObject;

        getPlayers = GameObject.FindGameObjectsWithTag("Pilot");
        getAIs = GameObject.FindGameObjectsWithTag("PilotAI");
        Instantiate(spawner, new Vector2(10, 0), Quaternion.identity); // Spawn spawner
        spawnerScript = GameObject.Find("Spawner(Clone)").GetComponent<Spawner>();
        Instantiate(combatHUD, transform.position, Quaternion.identity);    // Spawn AI GUI
        waveOutcome = WaveOutcomes.Waiting;

        #region Next Round timer
        nextRoundTimer = new Timer(5000);
        nextRoundTimer.Elapsed += new ElapsedEventHandler(NextRound);
        nextRoundTimer.Enabled = true;

        callNewRound = false;
        #endregion
    }
开发者ID:JonasSkaug,项目名称:afgangsprojekt-team-tj,代码行数:34,代码来源:GameController.cs

示例9: ShouldThrowExceptionIfProgramDoesntExist

 public void ShouldThrowExceptionIfProgramDoesntExist()
 {
     using (var spawner = new Spawner())
     {
         Assert.Throws(typeof (ArgumentException), () => spawner.Spawn(new StartInfo {ProgramName = "asdf"}));
     }
 }
开发者ID:tanglebones,项目名称:ch-spawner,代码行数:7,代码来源:SpawnerTestFixture.cs

示例10: InitSpawners

 public void InitSpawners()
 {
     for (int i = 0; i < spawners.Length; i++)
     {
         spawnerCon = spawners[i].GetComponent<Spawner> ();
         spawnerCon.GetReady();
     }
 }
开发者ID:kingofraytown,项目名称:BOAB,代码行数:8,代码来源:SpawnManager.cs

示例11: Awake

 void Awake()
 {
     playerGoal = (Goal)GameObject.Find("PGoal").GetComponent(typeof(Goal));
     shadowGoal = (Goal)GameObject.Find("SGoal").GetComponent(typeof(Goal));
     player = GameObject.Find("Player");
     shadow = GameObject.Find("Shadow");
     spawner = (Spawner)gameObject.GetComponent(typeof(Spawner));
 }
开发者ID:adahera222,项目名称:Equate,代码行数:8,代码来源:GlobalControls.cs

示例12: Start

    // Use this for initialization
    void Start()
    {
        steeringBasics = GetComponent<SteeringBasics>();
        hide = GetComponent<Hide>();
        obstacleSpawner = GameObject.Find("ObstacleSpawner").GetComponent<Spawner>();

        wallAvoid = GetComponent<WallAvoidance>();
    }
开发者ID:provencher,项目名称:unity-movement-ai,代码行数:9,代码来源:HideUnit.cs

示例13: getInstance

	public static Spawner getInstance () {
		if(!instance) {
			container = new GameObject();
			container.name = "Spawner";
			instance = container.AddComponent(typeof(Spawner)) as Spawner;
		}
		return instance;
	}
开发者ID:clomax,项目名称:evosim,代码行数:8,代码来源:Spawner.cs

示例14: Awake

 void Awake ()
 {
     spawner = GetComponent<Spawner>();
     maxHorizontalShift = GameSettings.SmallPlatformWidth / 2;
     maxVerticalShift = GameSettings.SmallPlatformHeight / 2;
     smallPlatformHeight = GameSettings.SmallPlatformHeight;
     smallPlatformWidth = GameSettings.SmallPlatformWidth;
 }
开发者ID:ahung89,项目名称:magical-dash,代码行数:8,代码来源:HelperAction.cs

示例15: Awake

 // Use this for initialization
 void Awake()
 {
     floor = GameObject.Find ("Foreground");
     spawner = GameObject.Find ("Spawner").GetComponent<Spawner>();
     timeManager = GetComponent<TimeManager> ();
     print ("Hey");
     print (timeManager);
 }
开发者ID:Dan12,项目名称:ZombieRunner,代码行数:9,代码来源:GameManager.cs


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