Ejemplo n.º 1
0
 //=====================================================================
 #region Protected methods
 //=====================================================================
 /// <summary>
 /// Sources and initializes component variables.
 /// </summary>
 protected void InitVars(IMeleeDWGO weapon, GameObject attacker)
 {
     base.InitVars(weapon, attacker);
     // Initialise IMeleeObject variables
     this.KnockbackOrigin  = this.Attacker;
     this.SwingOffsetAngle = weapon.SwingOffsetAngle;
 }
Ejemplo n.º 2
0
 //=====================================================================
 #region Public methods
 //=====================================================================
 /// <summary>
 /// Initializes the MeleeObject variables, sets the appropraite GameObject
 /// rotation, swings the object radially around the attacker, and starts
 /// the self destruct countdown.
 /// </summary>
 /// <param name="weapon">
 /// The weapon script that fired this GameObject.
 /// </param>
 /// <param name="attacker">
 /// The GameObject initiating the attack/heal.
 /// </param>
 /// <param name="direction">
 /// The direction that the attack is to be made.
 /// </param>
 public void Init(IMeleeDWGO weapon, GameObject attacker, Vector3 direction)
 {
     InitVars(weapon, attacker);
     InitializeSwing(direction);
     StartCoroutine(StartSelfDestructCountdown());
 }