示例#1
0
        public void Teleport(Character2D MyCharacter)
        {
            TeleportedCharacter = MyCharacter;
            OriginalParent      = TeleportedCharacter.transform.parent;
            OriginalPosition    = TeleportedCharacter.transform.position;
            TeleportedCharacter.transform.position = transform.position;
            TeleportedCharacter.transform.SetParent(transform);
            TeleportedCharacter.SetMovement(false);
            TeleportedCharacter.SetHealthBarVisibility(true);
            Transform SpriteTransform = TeleportedCharacter.transform.GetChild(0);

            FoW.HideInFog MyFog = SpriteTransform.GetComponent <FoW.HideInFog>();
            if (MyFog)
            {
                MyFog.enabled = false;
            }
            TeleportedCharacter.transform.GetChild(0).GetComponent <SpriteRenderer>().enabled = true;
        }