Fix QuerySingle -> Single missed in example (#15667)
Missed in https://github.com/bevyengine/bevy/pull/15507
This commit is contained in:
		
							parent
							
								
									42e0771633
								
							
						
					
					
						commit
						7c03ca2562
					
				| @ -134,9 +134,9 @@ fn move_targets(mut enemies: Populated<(&mut Transform, &mut Enemy)>, time: Res< | |||||||
| /// If there is one, player will track it.
 | /// If there is one, player will track it.
 | ||||||
| /// If there are too many enemies, the player will cease all action (the system will not run).
 | /// If there are too many enemies, the player will cease all action (the system will not run).
 | ||||||
| fn move_pointer( | fn move_pointer( | ||||||
|     // `QuerySingle` ensures the system runs ONLY when exactly one matching entity exists.
 |     // `Single` ensures the system runs ONLY when exactly one matching entity exists.
 | ||||||
|     mut player: Single<(&mut Transform, &Player)>, |     mut player: Single<(&mut Transform, &Player)>, | ||||||
|     // `Option<QuerySingle>` ensures that the system runs ONLY when zero or one matching entity exists.
 |     // `Option<Single>` ensures that the system runs ONLY when zero or one matching entity exists.
 | ||||||
|     enemy: Option<Single<&Transform, (With<Enemy>, Without<Player>)>>, |     enemy: Option<Single<&Transform, (With<Enemy>, Without<Player>)>>, | ||||||
|     time: Res<Time>, |     time: Res<Time>, | ||||||
| ) { | ) { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 mgi388
						mgi388