예제 #1
0
        void UpdateFlyingState()
        {
            Talespire.Log.Indent();
            try
            {
                CreatureBoardAsset owner = OwnerCreature;
                if (Guard.IsNull(owner, "owner"))
                {
                    return;
                }

                float altitude = owner.GetCharacterPosition().Position.y;

                foreach (string memberId in Data.Members)
                {
                    Talespire.Minis.SetFlying(memberId, isFlying);
                }

                if (!isFlying)
                {
                    foreach (string memberId in Data.Members)
                    {
                        Talespire.Log.Debug($"Moving relative...");
                        Talespire.Minis.MoveRelative(memberId, new Vector3(0.01f, 0, 0.01f));
                    }
                }
            }
            finally
            {
                Talespire.Log.Unindent();
            }
        }
예제 #2
0
            public static CharacterPosition GetPosition(string id)
            {
                CreatureBoardAsset creatureAsset = GetCreatureBoardAsset(id);

                if (creatureAsset == null)
                {
                    return(null);
                }

                return(creatureAsset.GetCharacterPosition());
            }
예제 #3
0
            public static Vector3 GetHitTargetVector(string id)
            {
                Vector3            vector             = Vector3.zero;
                CreatureBoardAsset creatureBoardAsset = GetCreatureBoardAsset(id);

                if (creatureBoardAsset != null)
                {
                    if (creatureBoardAsset.HookHitTarget != null)
                    {
                        vector = creatureBoardAsset.HookHitTarget.position;
                    }
                    else
                    {
                        vector = creatureBoardAsset.GetCharacterPosition().Position.GetVector3();
                    }
                }
                return(vector);
            }