Example #1
0
        public static Vector3 screenPosition(this Data_PlayerInfo self, float time = 0f)
        {
            var position = self.position(time);
            var adjusted = refs.camera.WorldToScreenPoint(new Vector3(position.X, 0, position.Y));

            adjusted.y = Screen.height - adjusted.y;
            return(adjusted);
        }
Example #2
0
        public static bool isValid(this Data_PlayerInfo self, Vector2?validFrom = null)
        {
            var from = validFrom ?? refs.players.player.position();

            return(!self.IsDead && !self.IsDisconnected && refs.pathfinder.CanSee(self.position(), from, 0.5f));
        }