private void Start()
        {
            _owner            = photonView.Owner;
            _healthTextStartY = HealthText.rectTransform.localPosition.y;

            References.Instance.GameManager.AddPlayerPlanet(gameObject, this);

            if (photonView.IsMine)
            {
                GameManager.OnButton1Pressed += HandleButtonPress;
            }

            if (!PhotonNetwork.IsMasterClient)
            {
                Collider.enabled = false;
            }

            HealthText.text = Health.ToString();

            SavedData.OnAddKill += AddKill;
            AddKill(SavedData.Kills());
        }
Beispiel #2
0
        private void Start()
        {
            if (SavedData.PlayerName() != "")
            {
                NameInput.text = SavedData.PlayerName();
            }

            StatsText.text = "Wins: " + SavedData.Wins().ToString() + "\nPanets Destroyed: " + SavedData.Kills().ToString();
        }