Ejemplo n.º 1
0
    public ChaserEntry AddChaser(Chaser chaser)
    {
        ChaserEntry entry = new ChaserEntry(chaser);

        chasers.Add(entry);
        return(entry);
    }
Ejemplo n.º 2
0
    private void Start()
    {
        binding = FindObjectOfType <ChaserFlockManager>().AddChaser(this);

        if (Attack != null)
        {
            Attack();
        }
    }
Ejemplo n.º 3
0
 private bool IsNearby(ChaserEntry a, ChaserEntry b)
 {
     return(a != b && Vector3.Distance(a.CurrentPosition, b.CurrentPosition) < repulsionThreshold);
 }