chenxin
2020-10-19 69d78dba3b74f57708d0a5c04d3f0d8606f3ae9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using TowerDefense.Agents;
using TowerDefense.Targetting;
using TowerDefense.Towers;
using UnityEngine;
 
namespace TowerDefense.Affectors
{
    /// <summary>
    /// Abstract class that is used to apply <see cref="AgentEffect"/>s to <see cref="Agent"/>s
    /// </summary>
    [RequireComponent(typeof(Targetter))]
    public abstract class PassiveAffector : Affector, ITowerRadiusProvider
    {
        /// <summary>
        /// Color of effect radius visualization
        /// </summary>
        public  Color radiusEffectColor;
 
        public Targetter towerTargetter;
 
        /// <summary>
        /// Gets or sets the attack radius
        /// </summary>
        public float effectRadius
        {
            get { return towerTargetter.effectRadius; }
        }
 
        /// <summary>
        /// Gets the color used for effect radius visualisation
        /// </summary>
        public Color effectColor
        {
            get { return radiusEffectColor; }
        }
 
        /// <summary>
        /// Gets the targetter 
        /// </summary>
        public Targetter targetter
        {
            get { return towerTargetter; }
        }
    }
}