public override void initialize() { x = 1; y = 7; orientation = DGlobal.MapOrientations.NORTH; map = new DMap(this.mApp.graphics); map.loadMap("TestMap"); DCharacter testCharacter = new DCharacter(this.mApp.graphics); testCharacter.loadCharacter("Goblin"); testCharacter.setPosition(1, 2); map.addCharacter(testCharacter); testCharacter = new DCharacter(this.mApp.graphics); testCharacter.loadCharacter("Goblin"); testCharacter.setPosition(2, 4); map.addCharacter(testCharacter); testCharacter = new DCharacter(this.mApp.graphics); testCharacter.loadCharacter("Goblin"); testCharacter.setPosition(3, 6); testCharacter.setRightArmEquipped(true); map.addCharacter(testCharacter); }
private void CreateCharacter() { DCharacter chara = (DCharacter)ScriptableObject.CreateInstance <DCharacter>(); chara.SetIdentificator(assetName); chara.name = assetName; var container = (Container)AssetDatabase.LoadAssetAtPath("Assets/Paradox Engine/Database/Data/Characters.asset", typeof(Container)); container.data.Add(chara); AssetDatabase.AddObjectToAsset(chara, container); EditorUtility.SetDirty(container); EditorUtility.SetDirty(chara); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); VNDatabaseWindow.AsignElem(chara); }