24 lines
		
	
	
		
			411 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			411 B
		
	
	
	
		
			C#
		
	
	
	
using System.Collections;
 | 
						|
using System.Collections.Generic;
 | 
						|
using Godot;
 | 
						|
using System;
 | 
						|
 | 
						|
 | 
						|
 | 
						|
namespace Rokojori
 | 
						|
{
 | 
						|
  [Tool]
 | 
						|
  [GlobalClass]
 | 
						|
  public partial class DiscardSphere:Discarder
 | 
						|
  {    
 | 
						|
    [Export]
 | 
						|
    public float radius;
 | 
						|
   
 | 
						|
    public override bool IsInside( Vector3 position )
 | 
						|
    {
 | 
						|
      var localPoint = ToLocal( position );
 | 
						|
      return localPoint.LengthSquared() < radius * radius;
 | 
						|
    }
 | 
						|
   
 | 
						|
  }
 | 
						|
} |