コード例 #1
0
ファイル: RegularMode.cs プロジェクト: miguel-faria/Tangram
        public void player_turn()
        {
            _current_player_display.text = Util_Methods.capitalize_word(_current_player);
            GameObject current_picked_piece = PuzzleManager.picked_piece;

            if (current_picked_piece)
            {
                if (current_picked_piece.GetComponent <MovePiece>().get_just_errored())
                {
                    current_picked_piece.transform.position = PuzzleManager.Instance.get_init_positions()[current_picked_piece.transform.name][0];
                    PuzzleManager.picked_piece = null;
                }
            }
        }
コード例 #2
0
 public void player_turn()
 {
     _current_player_display.text = Util_Methods.capitalize_word(_current_player);
     if (GameManager.Use_Connection)
     {
         if (_just_started_turn)
         {
             _player_turn_remind = DateTime.Now;
             _just_started_turn  = false;
         }
         else if ((DateTime.Now - _player_turn_remind).TotalSeconds > Constants.REMIND_TIMEOUT)
         {
             _player_turn_remind = DateTime.Now;
             ((Networking.RosBridge.AskHelpROS)GameManager.Robot_Connection).child_turn("play", _current_player);
             ((Networking.RosBridge.AskHelpROS)GameManager.Robot_Connection).publish(GameManager.Instance.get_pub_topic(), "std_msgs/String");
         }
     }
 }