private void Start() { playerSprites = gameObject.GetComponent <PlayerSprites>(); playerSync = GetComponent <PlayerSync>(); pushPull = GetComponent <PushPull>(); registerTile = GetComponent <RegisterTile>(); pna = gameObject.GetComponent <PlayerNetworkActions>(); }
void Start() { if (isLocalPlayer) { pendingActions = new Queue <PlayerAction>(); UpdatePredictedState(); } playerScript = GetComponent <PlayerScript>(); playerSprites = GetComponent <PlayerSprites>(); registerTile = GetComponent <RegisterTile>(); }
private void Start() { if (isLocalPlayer) { pendingActions = new Queue <PlayerAction>(); UpdatePredictedState(); } playerScript = GetComponent <PlayerScript>(); playerSprites = GetComponent <PlayerSprites>(); healthBehaviorScript = GetComponent <HealthBehaviour>(); registerTile = GetComponent <RegisterTile>(); pushPull = GetComponent <PushPull>(); }
void Start() { //Temp solution for host in headless mode (hiding the player at Vector3.zero if (GameData.IsHeadlessServer && isLocalPlayer) { PlayerManager.LocalPlayer.transform.position = new Vector3(-1000f, -1000f, 0f); } if (isLocalPlayer) { pendingActions = new Queue <PlayerAction>(); UpdatePredictedState(); } playerMove = GetComponent <PlayerMove>(); playerSprites = GetComponent <PlayerSprites>(); playerScript = GetComponent <PlayerScript>(); registerTile = GetComponent <RegisterTile>(); }
private void Start() { //Init pending actions queue for your local player if (isLocalPlayer) { pendingActions = new Queue <PlayerAction>(); UpdatePredictedState(); } //Init pending actions queue for server if (isServer) { serverPendingActions = new Queue <PlayerAction>(); } playerScript = GetComponent <PlayerScript>(); playerSprites = GetComponent <PlayerSprites>(); healthBehaviorScript = GetComponent <HealthBehaviour>(); registerTile = GetComponent <RegisterTile>(); pushPull = GetComponent <PushPull>(); }
void Start() { playerSprites = gameObject.GetComponent <PlayerSprites>(); playerSync = GetComponent <PlayerSync>(); }
void Awake() { playerSprites = gameObject.GetComponent <PlayerSprites>(); photonView = gameObject.GetComponent <PhotonView>(); playerCollisions = gameObject.AddComponent <PlayerCollisions>(); }
private void Start() { playerSprites = gameObject.GetComponent <PlayerSprites>(); playerSync = GetComponent <PlayerSync>(); pushPull = GetComponent <PushPull>(); }