Guest User

Untitled

a guest
Nov 21st, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. Control[] dogArray = Game.Game.Instance.ctrlNodes.selectState.
  2.                                 Select(x => x as Dog).
  3.                                 Where(x => x != null).
  4.                                 Select(x => x.dogObject.gameObject.GetComponent<Control>()).
  5.                                 Where(x => x != null).ToArray();
  6. Control[] catArray = Game.Game.Instance.ctrlNodes.selectState.
  7.                                 Select(x => x as Cat).
  8.                                 Where(x => x != null).
  9.                                 Select(x => x.catObject.gameObject.GetComponent<Control>()).
  10.                                 Where(x => x != null).ToArray();
  11. Control[] combArray = dogArray.Concat(catArray).ToArray();
  12.  
  13. foreach (Control n in combArray)
  14. {
  15.     //n.Roar();
  16. }
Add Comment
Please, Sign In to add comment