public void Start() { // just a log that this plugin has started Debug.Log("starting example"); // create the adapter this.adapter = new FinalFrontierAdapter(); // plugin to Final Frontier this.adapter.Plugin(); // optional: log the version of Final Frontier Debug.Log("Final Frontier version: "+adapter.GetVersion()); if (this.adapter.IsInstalled()) // optional test { // register the ribbon with a unique code, a path to the png file and a name for a ribbon and an optional description // prestige and boolean attribute for a ribbon that has to be a first awarded ribbon are optional // IMPORTANT: do not register ribbons twice and not before all textures are loaded (not until GameScene LOADING is done)! KspRibbon = this.adapter.RegisterRibbon( RIBBON_CODE, // unique ribbon code RIBBON_BASE + "SpaceProgram", // path to ribbon png file "Space Program Ribbon", // name of ribbon "Awarded to every applicant that joines the kerbal space program" // description (optional) ); // // this is an example for a custom ribbon (i.e. the player can award manually) this.adapter.RegisterCustomRibbon( RIBBON_ID, // unique ribbon id RIBBON_BASE + "Custom1001", // path to ribbon png file "Custom Ribbon 1001", // name of ribbon "Awarded manually by the player" // description (optional) ); } // example usage: // ok, we want to award this ribbon to every applicant that enters the space program for real duties; // see callback below GameEvents.OnCrewmemberHired.Add(this.OnCrewmemberHired); // example usage: // everytime a vessel is recovered, we want to log some statistical data of the crew; // see callback below GameEvents.onVesselRecovered.Add(this.OnVesselRecovered); }
public void Start() { // just a log that this plugin has started Debug.Log("starting example"); // create the adapter this.adapter = new FinalFrontierAdapter(); // plugin to Final Frontier this.adapter.TryInstallPlugin(); // optional: log the version of Final Frontier Debug.Log("Final Frontier version: " + adapter.GetVersion()); if (this.adapter.IsInstalled()) // optional test { // register the ribbon with a unique code, a path to the png file and a name for a ribbon and an optional description // prestige and boolean attribute for a ribbon that has to be a first awarded ribbon are optional // IMPORTANT: do not register ribbons twice and not before all textures are loaded (not until GameScene LOADING is done)! KspRibbon = this.adapter.RegisterRibbon( RIBBON_CODE, // unique ribbon code RIBBON_BASE + "SpaceProgram", // path to ribbon png file "Space Program Ribbon", // name of ribbon "Awarded to every applicant that joines the kerbal space program" // description (optional) ); // // this is an example for a custom ribbon (i.e. the player can award manually) this.adapter.RegisterCustomRibbon( RIBBON_ID, // unique ribbon id RIBBON_BASE + "Custom1001", // path to ribbon png file "Custom Ribbon 1001", // name of ribbon "Awarded manually by the player" // description (optional) ); } // example usage: // ok, we want to award this ribbon to every applicant that enters the space program for real duties; // see callback below GameEvents.OnCrewmemberHired.Add(this.OnCrewmemberHired); // example usage: // everytime a vessel is recovered, we want to log some statistical data of the crew; // see callback below GameEvents.onVesselRecovered.Add(this.OnVesselRecovered); }