This package has been marked as deprecated, and it's suggested another
alternative is used.
Last updated | 2 years ago |
Total downloads | 218 |
Total rating | 1 |
Categories | Act I Act III |
Dependency string | Kopie-Kopie_Consumables_Api_thingy-1.0.0 |
Dependants | 0 other packages depend on this package |
README
example below
{
var piggyjar = ScriptableObject.CreateInstance<ConsumableItemData>();
piggyjar.description = "Using this will put a card in a jar for later use";
piggyjar.powerLevel = 2;
piggyjar.name= "Jar";
piggyjar.regionSpecific = false;
piggyjar.rulebookDescription = piggyjar.description;
piggyjar.rulebookCategory = AbilityMetaCategory.Part1Rulebook;
piggyjar.rulebookName = "Keepers Jar";
piggyjar.notRandomlyGiven = false;
byte[] imgBytes = File.ReadAllBytes(Path.Combine(this.Info.Location.Replace("consumablesapi.dll", ""), "Artwork/gloves.png"));
Texture2D tex = new Texture2D(2, 2);
tex.LoadImage(imgBytes);
piggyjar.rulebookSprite=Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100.0f);
NewConsumable(piggyjar, typeof(KeeperJar), LoadMeshAndMaterial(staticpath.Replace("consumablesapi.dll", "")+"jar.obj", staticpath.Replace("consumablesapi.dll", "")+"jar.png"), new Vector3(0,1.1f,-1.2f), new Vector3(0.5f,0.5f,0.5f));
}