public VERGEGame() : base() { System.Diagnostics.StackTrace stack = new System.Diagnostics.StackTrace(); stopWatch = new System.Diagnostics.Stopwatch(); stopWatch.Start(); // the assembly/namespace to search for script classes defaults to the one // from which this constructor was called. Type sourcetype = stack.GetFrame(1).GetMethod().DeclaringType; main_assembly = sourcetype.Assembly; main_namespace = sourcetype.Namespace; game_input_handler = () => { return true; }; // unless overriden, always pass control to the map handler VERGEGame.game = this; Default_Handlers.game = this; followers = new FollowerChain(null); // Set up timing this.IsFixedTimeStep = false; tick_length = 10; // In milliseconds. VERGE standard is 100 ticks per second _last_tick_time = 0; _tick = 0; // Set up graphics graphics = new GraphicsDeviceManager(this); // Uncomment this line to remove fps throttling: graphics.SynchronizeWithVerticalRetrace = false; camera = null; hook_render = null; system_font = null; MapContent = new ContentManager(Services, "Content"); Content.RootDirectory = "Content"; // Set up input input = new InputManager(); initialize_buttons(); // Initialize other variables global = new ScriptBank(); map = null; player = null; player_controllable_stack = new Stack<bool>(); player_controllable = PLAYER_CONTROLLABLE_DEFAULT; player_tile_obstruction = true; default_entity_handler = Default_Handlers.omnibus_vergestyle_handler; entities_paused = false; entities_paused_stack = new Stack<bool>(); action_queue = new Queue<Action>(); }
public Entity( SpriteBasis _basis, String ent_name ) : base(_basis, "Idle Down") { _facing = Direction.Down; obstructing = false; obstructable = true; tile_obstruction = true; autoface = true; visible = true; follow = null; name = ent_name; index = -1; // it's up to the map to maintain this move_animation_prefix = "Walk "; idle_animation_prefix = "Idle "; initialize_movement_attributes(); // Entities come from chrs, so they all have walk and idle animations defined. }