简体   繁体   English

unity-photon- 如何获取其他玩家的组件

[英]unity-photon- how can get other player's companent

I'm making a multiplayer game.我正在制作多人游戏。 I want to make a system.我想做一个系统。 When a "x" player play a game and there is a "y" player.当一个“x”玩家玩游戏并且有一个“y”玩家时。 "x" player should see "y" player's score on "y" player's head. “x”玩家应该在“y”玩家的头上看到“y”玩家的分数。 It okay I made it.没关系,我成功了。 But I want when "x" player's score less then "y" player's, "y" player's nickname become red.但是我想当“x”玩家的分数低于“y”玩家的分数时,“y”玩家的昵称变成红色。 In short how can get other player's score?总之怎么才能得到其他玩家的分数呢?

An option can be an Game Manager System where all the info can be collected and manipulated.一个选项可以是游戏管理系统,可以收集和操作所有信息。 Here you can check if the score 1 is less than score 2. With bool you can check and uncheck the colors.在这里您可以检查分数 1 是否小于分数 2。使用 bool 您可以检查和取消选中颜色。

Hope this will help you to develop an idea of how to do it.希望这将帮助您形成如何做到这一点的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM