예제 #1
0
 private void Start()
 {
     playerSprites = gameObject.GetComponent <PlayerSprites>();
     playerSync    = GetComponent <PlayerSync>();
     pushPull      = GetComponent <PushPull>();
     registerTile  = GetComponent <RegisterTile>();
     pna           = gameObject.GetComponent <PlayerNetworkActions>();
 }
예제 #2
0
 void Start()
 {
     if (isLocalPlayer)
     {
         pendingActions = new Queue <PlayerAction>();
         UpdatePredictedState();
     }
     playerScript  = GetComponent <PlayerScript>();
     playerSprites = GetComponent <PlayerSprites>();
     registerTile  = GetComponent <RegisterTile>();
 }
예제 #3
0
 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>();
 }
예제 #4
0
        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>();
        }
예제 #5
0
 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>();
 }
예제 #6
0
 void Start()
 {
     playerSprites = gameObject.GetComponent <PlayerSprites>();
     playerSync    = GetComponent <PlayerSync>();
 }
예제 #7
0
 void Awake()
 {
     playerSprites    = gameObject.GetComponent <PlayerSprites>();
     photonView       = gameObject.GetComponent <PhotonView>();
     playerCollisions = gameObject.AddComponent <PlayerCollisions>();
 }
예제 #8
0
 private void Start()
 {
     playerSprites = gameObject.GetComponent <PlayerSprites>();
     playerSync    = GetComponent <PlayerSync>();
     pushPull      = GetComponent <PushPull>();
 }