Skip to content

Commit

Permalink
Update v2.2.6
Browse files Browse the repository at this point in the history
* Add method chain
* API bump
  • Loading branch information
yuko fuyutsuki committed Dec 4, 2017
1 parent e492849 commit b7ea58c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ Select Language: [English](#eng), [日本語](#jpn)
<a name="eng"></a>
# English

<!--
## !! Caution !!
This branch is under development.
It may have many bugs.
-->

## Texter
Texter is plugin that displays and deletes FloatingTextPerticle supported to multi-world.
Latest: ver **2.2.5** _Papilio dehaanii(カラスアゲハ)_
Latest: ver **2.2.6** _Papilio dehaanii(カラスアゲハ)_

### Supporting
- [x] Multi-language (eng, jpn)
Expand Down Expand Up @@ -70,12 +72,14 @@ It is output as follows.
<a name="jpn"></a>
# 日本語

<!--
## !! 注意 !!
このブランチは開発中です。多くのバグを含む可能性があります。
-->

## Texter
TexterはFloatingTextPerticleを複数ワールドに渡り表示、削除ができるプラグインです。
最新バージョン: **2.2.5** _Papilio dehaanii(カラスアゲハ)_
最新バージョン: **2.2.6** _Papilio dehaanii(カラスアゲハ)_

### 対応状況
- [x] 複数言語 (eng, jpn)
Expand Down
24 changes: 12 additions & 12 deletions src/Texter/text/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,13 @@ public function getTitle(): string{
/**
* タイトルを変更します, # で改行です.
* @param string $title
* @return bool true
* @return Text
*/
public function setTitle(string $title): bool{
public function setTitle(string $title): Text{
$this->title = str_replace("#", "\n", $title);
$this->api->saveCrft($this);
$this->sendToLevel(self::SEND_TYPE_ADD);
return true;
return $this;
}

/**
Expand All @@ -267,13 +267,13 @@ public function getText(): string{
/**
* テキストを変更します, # で改行です
* @param string $text
* @return bool true
* @return Text
*/
public function setText(string $text): bool{
public function setText(string $text): Text{
$this->text = str_replace("#", "\n", $text);
$this->api->saveCrft($this);
$this->sendToLevel(self::SEND_TYPE_ADD);
return true;
return $this;
}

/**
Expand All @@ -287,12 +287,12 @@ public function isInvisible(): bool{
/**
* 不可視かどうか変更します
* @param bool $bool
* @return bool true
* @return Text
*/
public function setInvisible(bool $bool): bool{
public function setInvisible(bool $bool): Text{
$this->invisible = $bool;
$this->sendToLevel(self::SEND_TYPE_ADD);
return true;
return $this;
}

/**
Expand All @@ -306,13 +306,13 @@ public function getEntityId(): int{
/**
* エンティティIDを変更します
* @param int $eid
* @return bool true
* @return Text
*/
public function setEntityId(int $eid): bool{
public function setEntityId(int $eid): Text{
$this->sendToLevel(self::SEND_TYPE_REMOVE);
$this->eid = $eid;
$this->sendToLevel(self::SEND_TYPE_ADD);
return true;
return $this;
}

/**
Expand Down

0 comments on commit b7ea58c

Please sign in to comment.