chenxin
2020-12-25 01a178da6b8dd0ba4a1b44d6d09f907e943a5d12
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
46
47
48
49
50
51
using System.Collections.Generic;
using ActionGameFramework.Health;
using UnityEngine;
 
namespace TowerDefense.Towers
{
    /// <summary>
    /// A class that allows the TowerConfiguration to delegate
    /// different firing logic this component
    /// </summary>
    public interface ILauncher
    {
        /// <summary>
        /// The method for crafting the firing logic for the tower
        /// </summary>
        /// <param name="enemy">
        /// The enemy that the tower is targeting
        /// </param>
        /// <param name="attack">
        /// The projectile component used to attack the enemy
        /// </param>
        /// <param name="firingPoint"></param>
        void Launch(Targetable enemy, GameObject attack, Transform firingPoint, int idx = 0);
 
        /// <summary>
        /// The method for crafting the firing logic for the tower
        /// </summary>
        /// <param name="enemy">
        /// The enemy that the tower is targeting
        /// </param>
        /// <param name="attack">
        /// The projectile component used to attack the enemy
        /// </param>
        /// <param name="firingPoints">
        /// A list of firing points to fire from
        /// </param>
        void Launch(Targetable enemy, GameObject attack, Transform[] firingPoints);
 
        /// <summary>
        /// The method for crafting firing logic at multiple enemies
        /// </summary>
        /// <param name="enemies">
        /// The collection of enemies to attack
        /// </param>
        /// <param name="attack">
        /// The projectile component used to attack the enemy
        /// </param>
        /// <param name="firingPoints"></param>
        void Launch(List<Targetable> enemies, GameObject attack, Transform[] firingPoints,int maxAttack = 1);
    }
}