/// <summary>The mod entry point, called after the mod is first loaded.</summary> /// <param name="helper">Provides simplified APIs for writing mods.</param> public override void Entry(IModHelper helper) { this.config = helper.ReadConfig <BetterSlingshotsConfig>(); if (this.config.GalaxySlingshotPrice < 0) { this.config.GalaxySlingshotPrice = new BetterSlingshotsConfig().GalaxySlingshotPrice; helper.WriteConfig(this.config); } this.manager = new SlingshotManager(this.config, helper.Reflection); helper.Events.Input.ButtonPressed += this.OnButtonPressed; helper.Events.Input.ButtonReleased += this.OnButtonReleased; helper.Events.GameLoop.UpdateTicked += this.OnUpdateTicked; helper.Events.Display.MenuChanged += this.OnMenuChanged; }
//Projectile ideas //Ricochet //Homing //explode into bullets //boomerang //auto reload //slime public override void Entry(IModHelper helper) { config = helper.ReadConfig <BetterSlingshotsConfig>(); if (config.GalaxySlingshotPrice < 0) { config.GalaxySlingshotPrice = new BetterSlingshotsConfig().GalaxySlingshotPrice; helper.WriteConfig(config); } manager = new SlingshotManager(config, helper.Reflection); InputEvents.ButtonPressed += InputEvents_ButtonPressed; InputEvents.ButtonReleased += InputEvents_ButtonReleased; GameEvents.UpdateTick += GameEvents_UpdateTick; MenuEvents.MenuChanged += MenuEvents_MenuChanged; }
// Use this for initialization void Start() { player = FindObjectOfType <PlayerStats>(); sling = FindObjectOfType <SlingshotManager>(); startPos = transform.position; }
void Start() { pjboyMovement = GetComponent <PJMovement>(); slingshot = GetComponent <SlingshotManager>(); }
void Awake() { instance = this; }
void Start() { rb = GetComponent <Rigidbody2D>(); slingshot = GetComponent <SlingshotManager>(); }