人物状态
This commit is contained in:
@@ -62,6 +62,8 @@ namespace AibisDream.FixSystem
|
||||
yield return new WaitForSeconds(1);
|
||||
// 激活角色
|
||||
_curCharacter.SetActive(true);
|
||||
|
||||
characterData.isShow = false;
|
||||
UpdateCharacterData();
|
||||
}
|
||||
|
||||
@@ -101,8 +103,9 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
if (_curCharacter)
|
||||
{
|
||||
_curCharacter.SetActive(true);
|
||||
yield return FadeCharacter(1, duration);
|
||||
characterData.isShow = true;
|
||||
UpdateCharacterData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +114,8 @@ namespace AibisDream.FixSystem
|
||||
if (_curCharacter != null)
|
||||
{
|
||||
yield return FadeCharacter(0, duration);
|
||||
_curCharacter.SetActive(false);
|
||||
characterData.isShow = false;
|
||||
UpdateCharacterData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,18 +169,24 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public void AddLinkDevice()
|
||||
{
|
||||
characterData.hasDevice = true;
|
||||
UpdateCharacterData();
|
||||
LinkDevice.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
public void RemoveLinkDevice()
|
||||
{
|
||||
characterData.hasDevice = false;
|
||||
UpdateCharacterData();
|
||||
LinkDevice.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void CharacterShow(string characterName)
|
||||
public void CharacterShow(string characterName = "")
|
||||
{
|
||||
if (_curCharacter != null)
|
||||
{
|
||||
characterData.isShow = true;
|
||||
UpdateCharacterData();
|
||||
// 将角色的透明度设置为 1
|
||||
SetCharacterAlpha(1);
|
||||
}
|
||||
@@ -198,5 +208,7 @@ namespace AibisDream.FixSystem
|
||||
public string characterName;
|
||||
public string faceName;
|
||||
public string poseName;
|
||||
public bool hasDevice;
|
||||
public bool isShow;
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,16 @@ namespace AibisDream
|
||||
yield return character.CharacterInit(data.characterName);
|
||||
character.SwitchFace(data.faceName);
|
||||
character.SwitchPose(data.poseName);
|
||||
if (data.isShow) character.CharacterShow();
|
||||
if (data.hasDevice)
|
||||
{
|
||||
character.AddLinkDevice();
|
||||
}
|
||||
else
|
||||
{
|
||||
character.RemoveLinkDevice();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public IEnumerator Indoor(float duration)
|
||||
@@ -102,6 +112,8 @@ namespace AibisDream
|
||||
public string characterName;
|
||||
public string faceName;
|
||||
public string poseName;
|
||||
public bool hasDevice;
|
||||
public bool isShow;
|
||||
|
||||
public event Action<ClinicData> LoadEvent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user