GetSingleEntity() публичный Метод

public GetSingleEntity ( ) : Entity
Результат Entity
        private void SetGameGroup(Group group)
        {
            //The group should have 1 thing, always, but...
            //FIXME: after multiple restarts (via 'r' button in HUD) this fails - srivello
            if (group.count == 1)
            {
                _gameEntity = group.GetSingleEntity();
                _gameEntity.OnComponentReplaced += Entity_OnComponentReplaced;

                //set first value
                var scoreComponent = _gameEntity.score;
                SetText (scoreComponent.score);

            }
            else
            {
                Debug.LogWarning ("CC _scoreGroup failed, should have one entity, has count: " + group.count);
            }
        }
 private void GameGroup_OnEntityAdded(Group group, Entity entity, int index, IComponent component)
 {
     //TODO: I expect this to be called on game start and game restart, but not every StartNextRound, why - srivello
     //Debug.Log("added _gameEntity: " + _gameEntity);
     _gameEntity = group.GetSingleEntity();
 }
 private void GameGroup_OnEntityAdded(Group group, Entity entity, int index, IComponent component)
 {
     _gameEntity = group.GetSingleEntity();
     _bounds = _gameEntity.bounds.bounds;
 }
 private void OnGameEntityAdded(Group group, Entity entity, int index, IComponent component)
 {
     _gameEntity = group.GetSingleEntity();
 }
 private void PlayerGroup_OnEntityAdded(Group group, Entity entity, int index, IComponent component)
 {
     _playerEntity = group.GetSingleEntity();
 }