wangguan
2020-10-27 1cc976d33bfbe7488c85df9d35f28aa6e4360294
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
using System;
using UnityEngine;
 
namespace ActionGameFramework.Projectiles
{
    /// <summary>
    /// Interface allowing specification of generic projectiles.
    /// </summary>
    public interface IProjectile
    {
        /// <summary>
        /// Event fired when this projectile is launched
        /// 炮弹发射时触发的事件
        /// </summary>
        event Action fired;
 
        /// <summary>
        /// Fires this projectile from a designated start point to a designated world coordinate.
        /// 从指定起点向指定世界坐标发射该炮弹
        /// </summary>
        /// <param name="startPoint">Start point of the flight.</param>
        /// <param name="targetPoint">Target point to fly to.</param>
        void FireAtPoint(Vector3 startPoint, Vector3 targetPoint);
 
        /// <summary>
        /// Fires this projectile in a designated direction.
        /// 向指定方向发射该炮弹
        /// </summary>
        /// <param name="startPoint">Start point of the flight.</param>
        /// <param name="fireVector">Vector representing direction of flight.</param>
        void FireInDirection(Vector3 startPoint, Vector3 fireVector);
 
        /// <summary>
        /// Fires this projectile at a designated starting velocity, overriding any starting speeds.
        /// 以指定的起始速度发射该炮弹,覆盖任何起始速度
        /// </summary>
        /// <param name="startPoint">Start point of the flight.</param>
        /// <param name="fireVelocity">Vector3 representing launch velocity.</param>
        void FireAtVelocity(Vector3 startPoint, Vector3 fireVelocity);
    }
}