コード例 #1
0
ファイル: Eyes.cs プロジェクト: Irakus/WETI-Stealth-Game
    private bool CanSee(Visibility target)
    {
        float distance = Vector3.Distance(transform.position, target.transform.position);

        switch (target.Get())
        {
        case 0:
            return(distance <= darkViewDistance);

        case 1:
            return(distance <= semiLightViewDistance);

        default:
            return(distance <= lightViewDistance);
        }
    }