Exemple #1
0
 public void RemoveFocus(PinouInputReceiver ir)
 {
     if (_focuses.Contains(ir) == true)
     {
         _focuses.Remove(ir);
         ir.LooseFocus(this);
     }
 }
Exemple #2
0
 public void RemoveAllFocuses()
 {
     for (int i = _focuses.Count - 1; i >= 0; i--)
     {
         PinouInputReceiver ir = _focuses[i];
         _focuses.RemoveAt(i);
         ir.LooseFocus(this);
     }
 }
Exemple #3
0
        public void Focus(PinouInputReceiver ir, FocusMode mode = FocusMode.Additive)
        {
            if (mode == FocusMode.Exclusive)
            {
                _focuses.Clear();
            }

            if (_focuses.Contains(ir) == false)
            {
                _focuses.Add(ir);
                ir.ReceiveFocus(this);
            }
        }
 private void Update()
 {
     if (IsLinked == false)
     {
         switch (_linkingMethod)
         {
         case LinkingMethod.PlayerInputReceiver:
             PinouPlayer player = PinouApp.Player.GetPlayerByID(_playerID);
             if (player != null && player.Focuses.Length > 0)
             {
                 _currentReceiver = player.Focuses[0];
             }
             break;
         }
     }
 }
Exemple #5
0
 public bool IsFocused(PinouInputReceiver ir)
 {
     return(_focuses.Contains(ir));
 }