コード例 #1
0
        public static bool SetObjWithColVisibleByFow(PoolObjHandle <ActorRoot> inActor, GameFowManager fowMgr, COM_PLAYERCAMP inHostCamp)
        {
            if (!inActor)
            {
                return(false);
            }
            ActorRoot       handle = inActor.handle;
            VCollisionShape shape  = handle.shape;

            if (shape == null)
            {
                return(GameFowCollector.SetObjVisibleByFow(inActor, handle.gameObject, fowMgr, inHostCamp));
            }
            VInt3 location = handle.location;

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

            if (flag)
            {
                handle.Visible = true;
            }
            else
            {
                flag           = shape.AcceptFowVisibilityCheck(inHostCamp, fowMgr);
                handle.Visible = flag;
            }
            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);
        }