-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to use YAML for definition files (#17)
* Change to use YAML for definition files * Convert to yaml file * Fixed yaml load error
- Loading branch information
Showing
20 changed files
with
136 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
id: default_blue | ||
name: デフォルト - 青 | ||
userColor: '#6633ff' | ||
imoutoColor: '#ff3366' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id: kaede | ||
name: かえで | ||
description: 旧デフォルト | ||
age: 15 | ||
tsundereLevel: 5 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id: sakura | ||
name: さくら | ||
description: 新デフォルト | ||
age: 12 | ||
tsundereLevel: 3 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id: sumire | ||
name: すみれ | ||
description: 名称未設定 | ||
age: 10 | ||
tsundereLevel: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,48 @@ | ||
using System; | ||
using System.IO; | ||
using System.Xml.Serialization; | ||
using System.IO; | ||
using System.Text; | ||
|
||
namespace ImoutoDesktop.Models | ||
{ | ||
[Serializable] | ||
public class Balloon : PropertyChangedBase | ||
public class Balloon | ||
{ | ||
public Balloon() | ||
{ | ||
ImoutoColor = "#000000"; | ||
UserColor = "#000000"; | ||
} | ||
|
||
public Guid Id { get; set; } | ||
public string Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string ImoutoColor { get; set; } | ||
|
||
public string UserColor { get; set; } | ||
|
||
[XmlIgnore] | ||
public bool CanSelect { get; set; } | ||
|
||
[XmlIgnore] | ||
public string Image => Path.Combine(Directory, "balloon.png"); | ||
|
||
[XmlIgnore] | ||
public string ArrowUpImage => Path.Combine(Directory, "arrow0.png"); | ||
|
||
[XmlIgnore] | ||
public string ArrowDownImage => Path.Combine(Directory, "arrow1.png"); | ||
|
||
[XmlIgnore] | ||
public string Directory { get; set; } | ||
|
||
public override int GetHashCode() | ||
{ | ||
return Id.GetHashCode(); | ||
} | ||
|
||
public static Balloon LoadFrom(string path) | ||
{ | ||
using var reader = new StreamReader(path, Encoding.UTF8); | ||
|
||
var balloon = Serializer.Deserialize<Balloon>(reader); | ||
|
||
balloon.Directory = Path.GetDirectoryName(path); | ||
|
||
return balloon; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,44 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
using System.IO; | ||
using System.Text; | ||
|
||
namespace ImoutoDesktop.Models | ||
{ | ||
[Serializable] | ||
public class Character : PropertyChangedBase | ||
public class Character | ||
{ | ||
public Character() | ||
{ | ||
Age = 10; | ||
TsundereLevel = 4; | ||
} | ||
|
||
public Guid Id { get; set; } | ||
public string Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
public int Age { get; set; } | ||
|
||
public int TsundereLevel { get; set; } | ||
|
||
[XmlIgnore] | ||
public bool CanSelect { get; set; } | ||
|
||
[XmlIgnore] | ||
public string Directory { get; set; } | ||
|
||
public override int GetHashCode() | ||
{ | ||
return Id.GetHashCode(); | ||
} | ||
|
||
public static Character LoadFrom(string path) | ||
{ | ||
using var reader = new StreamReader(path, Encoding.UTF8); | ||
|
||
var character = Serializer.Deserialize<Character>(reader); | ||
|
||
character.Directory = Path.GetDirectoryName(path); | ||
|
||
return character; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.