void RegisterPlayer() { ID = "Playa" + _inputManager.PlayerNum; transform.name = ID; nickname = ID; scoreManager = GameObject.Find ("Score Manager").GetComponent<ScoreManagerCouch> (); networkManager = GameObject.Find ("_NetworkManager"); _networkController = networkManager.GetComponent<PlayersManager> (); _networkController.RegisterOfflinePlayer (ID); }
public void GetObjects() { Debug.Log ("GetCharacters local "); _OfflinePlayerController = GetComponent<OfflinePlayerController> (); ID = _OfflinePlayerController.ID; networkManager = GameObject.Find ("_NetworkManager"); _networkController = networkManager.GetComponent<PlayersManager> (); foreach (Transform child in transform) { if (child.gameObject.CompareTag (Tags.Character)) { character = child.gameObject; audioSource = child.gameObject.GetComponent<AudioSource> (); } } PlaySound (ID, SoundTypes.Spawning, audioSource); }
public bool IsMy() { return(Owner == PlayersManager.GetMyPlayer()); }
// Use this for initialization void Start() { ins = this; //test //NewPlayer(Instantiate(prefab)); }
protected override void RpcDoShootEffect(Vector3 pos, Quaternion rot, PhotonMessageInfo pmi) { BulletTrailPrefab.GetComponent <BulletMovment>().own = PlayersManager.FindPlayer(pmi.sender).gameObject.GetComponent <TankEvolution>().HullGameObject; Instantiate(BulletTrailPrefab, pos, rot); }
void OdbierzHpOfiaraRPC(PhotonPlayer ofiaraPP, float damage) { //Debug.Log("Gracz " + Player.FindPlayer(ofiaraPP).nick + " stracił " + damage + " punktów!"); PlayersManager.FindPlayer(ofiaraPP).currentHp -= damage; }
// Start is called before the first frame update void Start() { PM = GameObject.Find("PlayersManager").GetComponent <PlayersManager>(); Ch = GameObject.Find("Players").GetComponent <Character>(); }
void Awake() { if (Instance == null) Instance = this; else { Destroy(this.gameObject); return; } DontDestroyOnLoad(gameObject); }
public CharactersInitialisation(SetupScene setupSceneFrom) { playersManager = PlayersManager.playersManager; setupScene = setupSceneFrom; }
void Start() { PM = GameObject.Find("PlayersManager").GetComponent <PlayersManager>(); inventory = GameObject.Find("Players").GetComponent <InventorySystem>(); }
public ResultsScreen(Gamestate gamestate, PlayersManager playersManager, TextureManager textureManager, StatisticsManager statisticsManager) : base(gamestate, playersManager, ScreenType.Results) { StatisticsManager = statisticsManager; SaveStatistics(); Text = new Text(new Position(200, 25, 600, 100), Gamestate, new Vector2f(), 50, TextPosition.Middle, TextPosition.Middle, GetResultsText()); Buttons = new List <Button>(); Buttons.Add(new ActionButton(new Position(200, 150, 600, 100), Gamestate, new Vector2f(), 40, TextPosition.Middle, TextPosition.Middle, "Rematch", (MouseButtonEventArgs args) => { PlayersManager.ChangePlayer(); MessageBus.Instance.PostEvent(MessageType.ChangeScreen, this, new ChangeScreenEventArgs { Screen = ScreenType.Game }); })); Buttons.Add(new ActionButton(new Position(200, 300, 600, 100), Gamestate, new Vector2f(), 40, TextPosition.Middle, TextPosition.Middle, "New Game", (MouseButtonEventArgs args) => { Gamestate.Clear(); MessageBus.Instance.PostEvent(MessageType.ChangeScreen, this, new ChangeScreenEventArgs { Screen = ScreenType.Pregame }); })); Buttons.Add(new ReturnButton(new Position(25, 875, 100, 100), Gamestate, textureManager.TexturesDictionary[TextureType.Icon]["back"], ScreenType.MenuScreen)); }
public PlayerController() { _playersManager = new PlayersManager(); _teamsManager = new TeamsManager(); }
private void Awake() { PM = GameObject.Find("PlayersManager").GetComponent <PlayersManager>(); PMove = GameObject.Find("Players").GetComponent <PlayerMovement>(); }
/// <summary> /// Инициализация ViewModel'и футбол /// </summary> /// <param name="playerList"></param> public FootballViewModel(IFootballPlayerList playerList, IFootballField field, IEfficiencyChart chart) { _playerList = playerList; _playersManeger = new PlayersManager(playerList, field, chart); _selectedTabIndex = 0; }
// Use this for initialization public void Init () { _networkController = FindObjectOfType<PlayersManager> (); audioPlayer = GetComponent<AudioPlayerCharacter> (); initialized = true; }
bool destroy_portals = false; //The portals has to be destoryed void Awake() { players_manager = GameObject.Find("Players").GetComponent <PlayersManager>(); }
void SetCameraDeathRPC(PhotonMessageInfo pmi) { Debug.Log("Ustawiam u siebie CAMERE!!!!!!!!!!"); Debug.Log(PlayersManager.FindPlayer(pmi.sender).gameObject.name); tankStore.camDeadTarget = PlayersManager.FindPlayer(pmi.sender).gameObject.GetComponent <TankEvolution>().HullGameObject; //TO DO: wysłać to przez RPC }
void Start() { m_playersManager = FindObjectOfType<PlayersManager>(); }
private void Awake() { playersManager = FindObjectOfType <PlayersManager>(); }
public Client(int playerId, UdpClient udpClient, PacketsReceiver packetsReceiver, PacketsSender packetsSender, PlayersManager playersManager, MetaMonoBehaviours metaMonoBehaviours) { this.playerId = playerId; tcpConnection = null; udpIpEndPoint = null; this.metaMonoBehaviours = metaMonoBehaviours; this.udpClient = udpClient; this.packetsReceiver = packetsReceiver; this.packetsSender = packetsSender; this.playersManager = playersManager; }
public void Init() { _multiplayerPlayerController = GetComponent<MultiplayerPlayerController> (); _playersManager = FindObjectOfType<PlayersManager> (); }
public void InitializeTest() { _playersManager = new PlayersManager(); _stringWriter = new StringWriter(); }
public void Init () { if (initialized) return; playerObjects = GetComponent<PlayerObjectReferences>(); _scoreManager = FindObjectOfType<ScoreManager> (); if (_scoreManager != null && base.isServer) _scoreManager.OnRoundStart += Revive; killsFeed = FindObjectsOfType<ChatEnterer> ().FirstOrDefault(c => c.feedType == ChatFeederTypes.Kills); chatFeed = FindObjectsOfType<ChatEnterer> ().FirstOrDefault(c => c.feedType == ChatFeederTypes.Chat); characterLoader = playerObjects.transform.GetComponent<CharacterLoader>(); // fill health and ammo health = maxHealth; ammo = maxAmmo; //find start positions _startPositions = GameObject.FindGameObjectsWithTag (Tags.SpawnPoint); _character = playerObjects.character; selfInjury = _character.injurator; //find audio network sync _audioPlayer = GetComponent<AudioPlayerCharacter> (); _playersManager = FindObjectOfType <PlayersManager> (); _hudController = FindObjectOfType<HudController> (); statusIndicators = playerObjects.statusIndicators; if (base.isLocalPlayer) { Cmd_GetPlayers (); if (chatFeed != null) { chatFeed.OnPostChatMessage += PostChatMessage; } } Revive (); StartCoroutine(CleareMessagesCount()); initialized = true; /* events */ JetsonsAnalytics.LogEquipment(); }
void Start() { uIController = UIController.instance; playersManager = PlayersManager.instance; }
void ZabiJOfiareRPC(PhotonPlayer ofiaraPP) { PlayersManager.FindPlayer(ofiaraPP).gameObject.GetComponent <TankDeath>().OnDead(); }
public void Cmd_GetPlayers () { if (_playersManager == null) _playersManager = FindObjectOfType <PlayersManager> (); for (int i = 0; i < _playersManager.players.Length; i++) { _playersManager.players [i].gameObject.GetComponent<Combat> ().Rpc_GetPlayers (); } }
void Start() { anim = GetComponent <Animator>(); manager = Camera.main.GetComponent <PlayersManager> (); }
void Start() { m_playersManager = FindObjectOfType<PlayersManager>(); m_audioSource = GetComponent<AudioSource>(); m_audioDirector = FindObjectOfType<AudioDirector>(); }
public void Start() { PM = GameObject.Find("PlayersManager").GetComponent <PlayersManager>(); ObjectsHierarchy = GameObject.Find("Objetos"); }