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 System; | |
using System.Collections.Generic; | |
namespace Yna.Utils | |
{ | |
/// <summary> | |
/// An hybrid collection who work like a Queue with the advantages | |
/// of a List. It's a List object with 3 extension methods who simulates a Queue | |
/// </summary> | |
/// <typeparam name="T"></typeparam> |
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
// Fonction pour déclencher un évènement sur un élément du dom | |
function triggerEvent(element, eventName) | |
{ | |
if ((element[eventName] || false) && typeof element[eventName] == 'function') | |
{ | |
element[eventName](element); | |
} | |
} | |
// Récupération d'un élément du dom |
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 foo (params) | |
{ | |
// Paramètres de la fonctions ils peuvent être vide | |
var params = params || {}; | |
// Prendra toujours true à cause de l'opération || | |
var add = params.add || true; | |
// Là la variable add prendre la bonne valeur | |
var add; |
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
// Tant que les modèles ne sont pas tous chargés on affiche rien | |
var waiting = setInterval(function(t) | |
{ | |
if (player1.loaded && player2.loaded && player3.loaded && player4.loaded) | |
{ | |
clearInterval(waiting); | |
setupGame("canvasContainer"); | |
contextPlayer = player1; | |
document.getElementById("canvasContainer").removeChild(document.getElementById("loadingPage")); | |
} |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using SharpDX; | |
using SharpDX.Toolkit; | |
using SharpDX.Toolkit.Content; | |
using SharpDX.Toolkit.Graphics; |
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
[Serializable] | |
public class Level | |
{ | |
public int Id { get; protected set; } | |
public Point3 Position { get; set; } | |
public Size3 Sizes { get; set; } | |
public string WallTexture { get; protected set; } | |
public string GroundTexture { get; protected set; } | |
public string TopTexture { get; protected set; } | |
public int Width { get; protected set; } |
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
public static class BoundingBoxRenderer | |
{ | |
#region Fields | |
static VertexPositionColor[] verts = new VertexPositionColor[8]; | |
static short[] indices = new short[] | |
{ | |
0, 1, | |
1, 2, | |
2, 3, |
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 events = []; | |
ujs.notify = function (name, params) | |
{ | |
if (typeof(events[name]) != "undefined") { | |
var event = events[name]; | |
if (params instanceof Object) { | |
for(var i in params) { |
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 mouseState = { | |
x: 0, | |
y: 0, | |
last: { x: 0, y: 0 }, | |
delta: { x: 0, y: 0 }, | |
click: false, | |
release: true, | |
drag: false, | |
updatePositions: function (event) { | |
this.last.x = this.x; |