コード例 #1
0
 protected override void OnSelected(PlayerBehaviour player)
 {
     player.BindInteraction(KeyCode.O, "打开",
                            new Action(() =>
     {
         SendMessage("OnPlayerOpen", player);
     }));
 }
コード例 #2
0
        protected override void OnSelected(PlayerBehaviour player)
        {
            _spriteRenderer.color = new Color(0.7f, 0.7f, 0.7f, 1);

            player.BindInteraction(KeyCode.P, "收集",
                                   new Action(() =>
            {
                SendMessage("OnPlayerPickup", player);
            }));
        }