public LoadLevelState(SignalBus signalBus, ScriptableGraph Graph, IPathService pathService, GameService service) { this.service = service; this.signalBus = signalBus; this.Graph = Graph; this.pathService = pathService; }
public void OnEnable() { graph = (ScriptableGraph)target; position_values = new int[graph.maxhight, graph.maxwidth]; int multiplier = 5; hzero = ((int)(Mathf.Ceil(((float)graph.maxwidth / 2)))) - 1; vzero = ((int)(Mathf.Ceil(((float)graph.maxhight / 2))) - 1); for (int i = 0; i < graph.maxhight; i++) { for (int j = 0; j < graph.maxwidth; j++) { position_values[i, j] = -1; } } }
/// <summary> /// Handles the Startup event that is fired once the Silverlight application /// has completed its startup process. /// </summary> /// <param name="sender">The object (Silverlight application) that fire the event</param> /// <param name="e">The arguments for the event</param> private void Current_Startup(object sender, StartupEventArgs e) { // Initialize the configuration manager, passing in the key/value list of // configuration settings that was specified by the host. ConfigurationManager.Instance.Initialize(e.InitParams); // Create the scriptable object ScriptableGraph scriptableGraph = new ScriptableGraph(); // Register our scriptable object System.Windows.Browser.HtmlPage.RegisterScriptableObject("SNAGL", scriptableGraph); HtmlPage.RegisterCreateableType("ScriptableAttributeMapData", typeof(ScriptableAttributeMapData)); HtmlPage.RegisterCreateableType("ScriptableEdgeMapData", typeof(ScriptableEdgeMapData)); HtmlPage.RegisterCreateableType("ScriptableIconNodeMapData", typeof(ScriptableIconNodeMapData)); HtmlPage.RegisterCreateableType("ScriptablePoint", typeof(ScriptablePoint)); HtmlPage.RegisterCreateableType("ScriptableSize", typeof(ScriptableSize)); HtmlPage.RegisterCreateableType("ScriptableTextNodeMapData", typeof(ScriptableTextNodeMapData)); // Initialize the extension manager ExtensionManager.Initialize(); // Compose the parts for the GraphManager class ExtensionManager.ComposeParts(GraphManager.Instance); // Load the theme for the application LoadTheme(); // Set the application to its previous state ApplyPreferences(); // Load extensions LoadExtensions(); // Load any external resources LoadExternalResources(ConfigurationManager.Instance.CurrentConfig.ExternalResources); // Listen for application wide events SnaglEventAggregator.DefaultInstance.GetEvent <TimeConsumingTaskExecutingEvent>().Subscribe(TimeConsumingTaskExecutingEventHandler, false); SnaglEventAggregator.DefaultInstance.GetEvent <TimeConsumingTaskCompletedEvent>().Subscribe(TimeConsumingTaskCompletedEventHandler, false); //logger.WriteLogEntry(LogLevel.DEBUG, "TEST", null, null); }