View Player.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.InputSystem; | |
public class Player : MonoBehaviour { | |
InputActions controls; | |
public enum Perspective | |
{ | |
firstPerson, thirdPerson |
View Player.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.InputSystem; | |
public class Player : MonoBehaviour { | |
InputActions controls; | |
public float speed = 1f; | |
public float sensitivity = 1f; |
View Index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function compress($source, $destination, $quality) { | |
$info = getimagesize($source); | |
if ($info['mime'] == 'image/jpeg') { | |
$image = imagecreatefromjpeg($source); | |
} elseif ($info['mime'] == 'image/gif') { | |
$image = imagecreatefromgif($source); | |
} elseif ($info['mime'] == 'image/png') { | |
$image = imagecreatefrompng($source); | |
} | |
imagejpeg($image, $destination, $quality); |
View connect.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$mysqli = new mysqli($var["database"]["hostname"], $var["database"]["username"], $var["database"]["password"], $var["database"]["database"]); | |
if ($mysqli->connect_error) { | |
die("Connect Error (" . $mysqli->connect_errno . ") " . $mysqli->connect_error); | |
} | |
?> |
View ajax.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: "", | |
method: "GET", | |
data: { | |
}, | |
success: function(data) { | |
console.log(data); | |
}, | |
error: function(jqXHR, textStatus, errorThrown) { | |
console.log(jqXHR); |
View main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("a[href^='#']").on("click", function(event) { | |
event.preventDefault(); | |
var target = this.hash, | |
$target = $(target); | |
$("html, body").stop().animate({ | |
"scrollTop": $target.offset().top | |
}, 900, "swing", function() { | |
window.location.hash = target; | |
}); |
View main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var searchTimeout = 0; | |
$("input[name='search']").on("keyup paste", function() { | |
clearTimeout(searchTimeout); | |
searchTimeout = setTimeout(function() { | |
var searchValue = $("input[name='search']").val().toLowerCase().trim(); | |
$("table tbody tr").addClass("d-none"); | |
$("table tbody").find("tr").each(function(i) { | |
if (~$(this).html().toLowerCase().trim().indexOf(searchValue)) { | |
$(this).removeClass("d-none"); | |
} |