Ejemplo n.º 1
0
        private void CheckForPlacement()
        {
            if (!isLocalPlayer)
            {
                return;
            }

            // Make sure the placement is in a valid build area before placing.
            if (Input.GetButtonDown("Fire1") && mCurrentSpawnableInstance.IsInValidBuildArea())
            {
                NetworkIdentity owningPlayer = GetComponent <NetworkIdentity>();
                if (owningPlayer != null)
                {
                    CmdSpawnOnServer(0, //CHANGE THIS SO NOT HARD CODED! -from Rob
                                     mCurrentSpawnableInstance.transform.position,
                                     mCurrentSpawnableInstance.transform.rotation,
                                     owningPlayer);
                }
                Cursor.visible = true;
            }
        }