GithubHelp home page GithubHelp logo

communalhelper / cavernhelper Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 2.98 MB

A community-maintained Celeste helper, originally by Exudias.

License: MIT License

Julia 7.38% C# 85.59% Lua 7.04%

cavernhelper's Introduction

Cavern Helper

A helper for Celeste. Originally created by Exudias and now maintained by the Communal Helper organization.

The release build can be downloaded here.

Head to our issues page to leave a bug report or feature request.

API

This mod uses a ModInterop API, which allows you to import methods into your own mods without referencing Cavern Helper directly. To use it, add Cavern Helper as an optional dependency and use the version where the methods you need were exported (or later).

Check out the API code for documentation on individual methods.

Basic usage guide and version info:

// Add somewhere in your mod. You only need to include delegates that you need.
[ModImportName("CavernHelper")]
public static class CavernHelperImports {
  // Added in v1.3.5
  public static Func<Action<Vector2>, Collider, Component> GetCrystalBombExplosionCollider;

  // Added in v1.3.7
  public static Func<Collider, Component> GetCrystalBombExploderCollider;
}

// Add to YourModule.Load()
typeof(CavernHelperImports).ModInterop();

// Example usages

// GetCrystalBombExplosionCollider (this example removes the custom entity if it is caught in the blast range of the explosion)
public void OnExplode(Vector2 position) {
  myEntity.RemoveSelf();
}

Component explosionCollider = GetCrystalBombExplosionCollider?.Invoke(OnExplode, null);
if (explodeCollider != null) {
  myEntity.Add(explosionCollider);
}

// GetCrystalBombExploderCollider (this example causes the crystal bomb to explode if it touches the custom entity)
Component exploderCollider = GetCrystalBombExploderCollider?.Invoke(myEntity.Collider);
if (exploderCollider != null) {
  myEntity.Add(exploderCollider);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.