예제 #1
0
        public static bool SetObjVisibleByFowAttached(GameObject obj, GameFowManager fowMgr, COM_PLAYERCAMP inHostCamp, PoolObjHandle <ActorRoot> inAttachActor)
        {
            if (obj == null)
            {
                return(false);
            }
            bool flag;

            if (inAttachActor)
            {
                VInt3 location = inAttachActor.get_handle().location;
                location = new VInt3(location.x, location.z, 0);
                flag     = fowMgr.IsSurfaceCellVisible(location, inHostCamp);
                if (flag)
                {
                    MMGame_Math.SetLayer(obj, "Actor", "Particles", true);
                }
                else
                {
                    MMGame_Math.SetLayer(obj, "Hide", true);
                }
            }
            else
            {
                flag = GameFowCollector.SetObjVisibleByFow(obj, fowMgr, inHostCamp);
            }
            return(flag);
        }
예제 #2
0
        public static bool SetObjWithColVisibleByFowAttached(GameObject inObj, GameFowManager fowMgr, COM_PLAYERCAMP inHostCamp, PoolObjHandle <ActorRoot> inAttachActor)
        {
            if (inObj == null)
            {
                return(false);
            }
            if (!inAttachActor || inAttachActor.get_handle().shape == null)
            {
                return(GameFowCollector.SetObjVisibleByFow(inObj, fowMgr, inHostCamp));
            }
            VCollisionShape shape    = inAttachActor.get_handle().shape;
            VInt3           location = inAttachActor.get_handle().location;

            location = new VInt3(location.x, location.z, 0);
            bool flag = fowMgr.IsSurfaceCellVisible(location, inHostCamp);

            if (flag)
            {
                MMGame_Math.SetLayer(inObj, "Actor", "Particles", true);
            }
            else
            {
                flag = shape.AcceptFowVisibilityCheck(inHostCamp, fowMgr);
                if (flag)
                {
                    MMGame_Math.SetLayer(inObj, "Actor", "Particles", true);
                }
                else
                {
                    MMGame_Math.SetLayer(inObj, "Hide", true);
                }
            }
            return(flag);
        }
예제 #3
0
        public static bool SetObjVisibleByFow(GameObject obj, GameFowManager fowMgr, COM_PLAYERCAMP inHostCamp)
        {
            if (obj == null)
            {
                return(false);
            }
            VInt3 worldLoc = (VInt3)obj.transform.position;

            worldLoc = new VInt3(worldLoc.x, worldLoc.z, 0);
            bool flag = fowMgr.IsSurfaceCellVisible(worldLoc, inHostCamp);

            if (flag)
            {
                MMGame_Math.SetLayer(obj, "Actor", "Particles", true);
            }
            else
            {
                MMGame_Math.SetLayer(obj, "Hide", true);
            }
            return(flag);
        }