A Pen by Captain Anonymous on CodePen.
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
func find_traversable_tiles(actor_position, steps): | |
var new_actor_position = world_to_map(actor_position) | |
var actor_index = _get_id_for_point(new_actor_position) | |
for x in range(3): | |
for y in range(3): | |
var walkable_tile = new_actor_position + Vector2(x - 1, y - 1) | |
if walkable_tile in obstacles: | |
continue | |
var tile_id = _get_id_for_point(walkable_tile) | |
astar.add_point(tile_id, Vector2(walkable_tile.x, walkable_tile.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
extends TileMap | |
# You can only create an AStar node from code, not from the Scene tab | |
onready var astar_node = AStar2D.new() | |
# The Tilemap node doesn't have clear bounds so we're defining the map's limits here | |
export(Vector2) var map_size = Vector2(16, 16) | |
# The path start and end variables use setter methods | |
# You can find them at the bottom of the script | |
var path_start_position = Vector2() setget _set_path_start_position |
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
$('#companyName').keydown(function(e) { | |
if (e.which === 13) { | |
var companyNameVal = $('#companyName').val(); | |
if (companyNameVal === '') { | |
$(this).css({'border': '1px solid red'}) | |
$('.error').text('Please enter a valid company name.'); | |
} | |
else if (companyNameVal === 'Ford') { | |
$('#companySuccessModal').modal('show'); | |
$('#companyName').css({'border': 'none'}); |
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
<div class="navbar navbar-inverse navbar-fixed-top" id="main-nav"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand default-logo" href="/owm-lander"><img src="img/logo.png" ></a> | |
<a class="navbar-brand scrolled-logo" href="/owm-lander"><img src="img/scrolled-logo.png"></a> |
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
$scope.rateItem = (rating) -> | |
reviewUrl = 'http://mfbackend.appspot.com/json/reviewitem' | |
data = | |
userid: userId | |
authtoken: authValue | |
itemid: "15001" | |
rating: "1" | |
description: "" |
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
.controller("LoginController", ['$scope', '$http', 'localStorageService', '$location', ($scope, $http, localStorageService, $location) -> | |
$scope.login = -> | |
$http( | |
method: 'POST', | |
url: 'http://mfbackend.appspot.com/json/login', | |
data: $.param( | |
username: $scope.user.username | |
password: $scope.user.password | |
), |
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
<ul class="nav"> | |
<li> | |
<a href="/" class="#{'active' if current_page.url == '/'}">Home</a> | |
</li> | |
<li> | |
<a href="resume.html" class="#{'active' if current_page.url == 'resume.html'}">Resume</a> | |
</li> | |
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
set guioptions-=T " hide toolbar | |
set lines=55 columns=100 | |
colorscheme railscasts | |
set guifont=Monaco:h16 | |
set lines=999 | |
set columns=999 |
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
execute pathogen#infect() | |
colorscheme vividchalk | |
set number | |
syntax on | |
set autoindent | |
set smartindent | |
set smarttab | |
set shiftwidth=2 | |
set softtabstop=2 | |
set tabstop=2 |
NewerOlder