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
void GameState::inrange_lights() | |
{ | |
//do comparison code in here | |
/* | |
if the player is within the light | |
then take that lights x and y pos & compare that wil all other lights returning distance_between | |
if the distance_between is < 300 | |
draw a shadow within that light | |
else | |
move on to the next light |
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
sf::RenderWindow& window = state_manager_.get_render_window(); | |
sf::View view_main; | |
view_main.setCenter(sf::Vector2f(player_.Shape().getOrigin().x, player_.Shape().getOrigin().y)); | |
view_main.setSize(sf::Vector2f(600, 400)); | |
view_main.move(player_.Shape().getPosition().x, player_.Shape().getPosition().y); | |
if (view_main.getCenter().x + (view_main.getSize().x / 2) >= LEVEL_WIDTH) | |
view_main.setCenter(LEVEL_WIDTH - (view_main.getSize().x / 2), view_main.getCenter().y); |
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
void Guard::player_search(Player player) | |
{ | |
if (player.Shape().getPosition().x - Shape().getPosition().x <= hunting_distance_) | |
gotoXpos = player.Shape().getPosition().x; | |
movement_distance_ = gotoXpos - Shape().getPosition().x; | |
if (Shape().getPosition().x < gotoXpos) | |
movement_speed_ *= 1.f; |
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
if (treeData == null) { | |
var treeData = Ext.Ajax.request({ | |
method: 'GET', | |
url: '/Dashboard/GetNavigationData', | |
success: function (response) { | |
treeData = Ext.util.JSON.decode(response.responseText).results; | |
var newChild = {}; | |
var list = []; | |
var treeNode = newTree.getRootNode(); |
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
if (treeData == null) { | |
var treeData = Ext.Ajax.request({ | |
method: 'GET', | |
url: '/Dashboard/GetNavigationData', | |
success: function (response) { | |
treeData = Ext.util.JSON.decode(response.responseText).results; | |
var list = []; | |
var treeNode = newTree.getRootNode(); |
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 System.Security.Cryptography; | |
namespace AdventOfCode_Day5 | |
{ | |
class Program | |
{ |
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 System.Security.Cryptography; | |
namespace AdventOfCode_Day5 | |
{ | |
class Program | |
{ |
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
do | |
{ | |
inputCopy = input; | |
inputCopy += index.ToString(); | |
data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(inputCopy)); | |
if(data[0] == 0) | |
{ | |
if (data[1] == 0) | |
{ | |
if (data[2] == 0) |
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
byte[] data = null; | |
List<byte[]> dataList = new List<byte[]>(); | |
string inputCopy = input; | |
// Convert the input string to a byte array and compute the hash. | |
do | |
{ | |
Console.WriteLine("The index " + index+ "."); | |
inputCopy = input; | |
inputCopy += index.ToString(); |
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
do | |
{ | |
Console.WriteLine("The index " + index + "."); | |
inputCopy = input; | |
inputCopy += index.ToString(); | |
data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(inputCopy)); | |
System.Text.StringBuilder sBuilder = new StringBuilder(); | |
for (int i = 0; i < data.Length; i++) | |
{ | |
sBuilder.Append(data[i].ToString("x2")); |
OlderNewer