Exemplo n.º 1
0
        public virtual void ServerDoLerpAnimation(Vector2 dir)
        {
            rotatable.SetFaceDirectionLocalVictor(dir.To2Int());

            isActing = true;
            MobMeleeLerpMessage.Send(gameObject, dir);
            StartCoroutine(WaitForLerp());
        }
Exemplo n.º 2
0
        public virtual void ServerDoLerpAnimation(Vector2 dir)
        {
            directional.FaceDirection(Orientation.From(dir));

            Pause    = true;
            isActing = true;
            MobMeleeLerpMessage.Send(gameObject, dir);
            StartCoroutine(WaitForLerp());
        }
Exemplo n.º 3
0
        public static MobMeleeLerpMessage Send(GameObject mob, Vector2 dir)
        {
            //Only send to players in the area so that clients cannot snoop on mob positions
            //by watching debug log outputs from the process coroutine on this message

            MobMeleeLerpMessage msg = new MobMeleeLerpMessage
            {
                mob = mob.GetComponent <NetworkIdentity>().netId,
                dir = dir
            };

            msg.SendToVisiblePlayers(mob.transform.position);

            return(msg);
        }