public void SlideActor(ActorSlot actor) { Debug.Log("Slide actor"); CharacterSprite charSprite = CutsceneManager.Instance.rightCharacter.GetComponent <CharacterSprite>(); charSprite.Face.enabled = true; charSprite.Outfit.enabled = true; charSprite.Face.sprite = actor.Actor.BattleFacePath.Get(); charSprite.Outfit.sprite = actor.Actor.BattleOutfitPath.Get(); Transform dest = CutsceneManager.Instance.RightSpot; Image rightImage = CutsceneManager.Instance.rightCharacter; Vector3 _beginPoint = new Vector3(dest.position.x + 100, rightImage.transform.position.y, rightImage.transform.position.z); Vector3 _endPoint = new Vector3(CutsceneManager.Instance.RightSpot.position.x, _beginPoint.y, _beginPoint.z); Image _face = charSprite.Face; Image _outfit = charSprite.Outfit; rightImage.transform.position = _beginPoint; LeanTween.move(rightImage.gameObject, _endPoint, SpriteTime); MovementNode.ColorChange(_outfit.gameObject, new Color(0.7f, 0.7f, 0.7f, 1), new Color(1, 1, 1, 1), SpriteTime); MovementNode.ColorChange(_face.gameObject, new Color(0.7f, 0.7f, 0.7f, 1), new Color(1, 1, 1, 1), SpriteTime); }
public void HideSprite() { CharacterSprite charSprite = CutsceneManager.Instance.rightCharacter.GetComponent <CharacterSprite>(); Transform dest = CutsceneManager.Instance.RightSpot; Image rightImage = CutsceneManager.Instance.rightCharacter; Vector3 _endPoint = new Vector3(CutsceneManager.Instance.RightSpot.position.x + 100, charSprite.transform.position.y, charSprite.transform.position.z); Image _face = charSprite.Face; Image _outfit = charSprite.Outfit; LeanTween.move(rightImage.gameObject, _endPoint, SpriteTime); MovementNode.ColorChange(_outfit.gameObject, new Color(1f, 1f, 1f, 1), new Color(0.0f, 0.0f, 0.0f, 0.0f), SpriteTime); MovementNode.ColorChange(_face.gameObject, new Color(1, 1, 1, 1), new Color(0.0f, 0.0f, 0.0f, 0.0f), SpriteTime); StartCoroutine(DisableSprite(charSprite)); }