コード例 #1
0
    /// <summary>
    /// Adds an aura to the actor according to the aura's ID no.
    /// </summary>
    /// <param name="auraID"></param>
    public void AddActorAura(int auraID)
    {
        Aura      aura         = db.conddb.Aura(auraID);
        ActorAura newActorAura = new ActorAura(aura);

        actorAuras.Add(newActorAura);
        newActorAura.ApplyActorAura(this);

        // Start the aura's timer if it exists.
        if (aura.HasDuration)
        {
            StartCoroutine(AuraDurationTimer(aura.AuraDuration, newActorAura));
        }
    }
コード例 #2
0
 public void RemoveActorAura(ActorAura _actorAura)
 {
     actorAuras.Remove(_actorAura);
     _actorAura.RemoveActorAura(this);
 }
コード例 #3
0
    /*
     * This needs to be reworked when we want to see the
     * time remaining on the UI, but it works as of
     * 3rd Sept 2018.
     */
    IEnumerator AuraDurationTimer(double _dur, ActorAura aura)
    {
        yield return(new WaitForSeconds((float)_dur));

        RemoveActorAura(aura);
    }