This file contains hidden or 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
| use v5.10; | |
| use Mojolicious::Lite; | |
| get '/' => sub { | |
| shift->render(layout => 'page', text => 'hello world!', title => 'test'); | |
| }; | |
| get '/index' => 'index'; | |
| app->start; |
This file contains hidden or 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
| /// <summary> | |
| /// Applies movement to the character based on input. | |
| /// </summary> | |
| /// <param name="gameTime">The current GameTime object.</param> | |
| /// <param name="map">The current Map.</param> | |
| private void ApplyMovement(GameTime gameTime, Map map) | |
| { | |
| float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds; | |
| velocity = movement * speed; // movement = unit vector, int speed = 225 |
This file contains hidden or 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 (movement.X > 0) | |
| currX = bounds.Right; | |
| else if (movement.X < 0) | |
| currX = bounds.Left; | |
| if (movement.Y > 0) | |
| currY = bounds.Bottom; | |
| else if (movement.Y < 0) | |
| currY = bounds.Top; |
This file contains hidden or 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 Microsoft.Xna.Framework; | |
| using Microsoft.Xna.Framework.Audio; | |
| using Microsoft.Xna.Framework.Content; | |
| using Microsoft.Xna.Framework.GamerServices; | |
| using Microsoft.Xna.Framework.Graphics; | |
| using Microsoft.Xna.Framework.Input; |
This file contains hidden or 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
| texture: Link.png | |
| size: | |
| width: 32 | |
| height: 48 | |
| animations: | |
| idle-down: | |
| loop: true | |
| frames: | |
| 0: | |
| length: 1 |
This file contains hidden or 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
| { | |
| "texture": "Link.png", | |
| "size": { | |
| "width": 32, | |
| "height": 48 | |
| }, | |
| "animations": { | |
| "idle-down": { | |
| "loop": true, | |
| "frames": [ |
This file contains hidden or 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 Microsoft.Xna.Framework; | |
| using Microsoft.Xna.Framework.Graphics; | |
| namespace WanderfulEngine | |
| { | |
| public struct Message | |
| { | |
| /// <summary> |
This file contains hidden or 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 class DialogueTextChar | |
| { | |
| public Color color; | |
| public String message; | |
| public Vector2 position; | |
| public bool shake; | |
| public DialogueTextChar() | |
| { | |
| this.message = ""; |
This file contains hidden or 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
| private List<DialogueTextChar> constrainText(string message) | |
| { | |
| bool filled = false; | |
| string line = ""; | |
| string returnString = ""; | |
| string[] wordArray = message.Replace("\n", "").Split(' '); | |
| Color currentColor = Color.White; | |
| bool recolor = false; | |
| bool shake = false; | |
| bool stopShake = false; |
This file contains hidden or 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
| import clr | |
| clr.AddReference("Wanderful") | |
| clr.AddReference("WanderfulEngine") | |
| clr.AddReference("Microsoft.Xna.Framework") | |
| import Wanderful | |
| from WanderfulEngine import InputManager | |
| from Microsoft.Xna.Framework import Vector2 | |
| from Microsoft.Xna.Framework.Input import Keys |
OlderNewer