Example #1
0
    //여까지명우가넣은거

    private void Start()
    {
        if (FogOfWar.fogAlignment == FogOfWar.FogAlignment.DDDMode)
        {
            previousFaction          = FogOfWar3D.currentlyRevealed;
            rbody                    = gameObject.AddComponent <Rigidbody>();
            rbody.useGravity         = false;
            rbody.isKinematic        = true;
            sphereCollider           = gameObject.AddComponent <SphereCollider>();
            sphereCollider.isTrigger = true;

            if (FogOfWar3D.currentlyRevealed != faction)
            {
                sphereCollider.radius = 0f;
                isInTheSightRange     = false;//명우가넣은거
                Check();
                //Hide();
            }
            else
            {
                sphereCollider.radius = visionRange;
            }

            revealer3D = new Revealer3D(visionRange,
                                        faction,
                                        transform);

            FogOfWar3D.RegisterRevealer(revealer3D);
        }
        else
        {
            revealer = new Revealer(visionRange,
                                    faction,
                                    upVision,
                                    gameObject);

            FogOfWar.RegisterRevealer(revealer);

            if (dynamicBlock)
            {
                FogOfWar.RegisterVisionBlocker(gameObject);
            }

            if (faction == FogOfWar.RevealFaction)
            {
                isInTheSightRange = true;//명우가넣은거
                Check();
                //Show();
            }
            else
            {
                isInTheSightRange = false;//명우가넣은거
                Check();
                //Hide();
            }
        }
    }
Example #2
0
 public static void RegisterRevealer(Revealer3D revealer)
 {
     fogManager.RegisterRevealer(revealer);
 }
Example #3
0
    private void Start()
    {
        Revealer3D revealer = new Revealer3D(visionRange, faction, this.transform);

        FogOfWar3D.RegisterRevealer(revealer);
    }
Example #4
0
 public void RegisterRevealer(Revealer3D revealer)
 {
     revealers.Add(revealer);
 }