Example #1
0
    public override void onHitEffect(Entity control, Entity enemy)
    {
        GameObject hasteInstance = Instantiate(hasteStatusPrefab);
        Haste      hasteScript   = hasteInstance.GetComponent <Haste>();

        hasteScript.duration           = 1f;
        hasteScript.movementSpeedBonus = -5f;
        hasteScript.target             = enemy;
        hasteScript.onApply();
    }
Example #2
0
 public override void onAbility(Entity control)
 {
     if (hasteCooldownTimer <= 0)
     {
         hasteCooldownTimer = hasteCooldown;
         GameObject hasteInstance = Instantiate(hasteStatusPrefab);
         Haste      hasteScript   = hasteInstance.GetComponent <Haste>();
         hasteScript.duration           = 1f;
         hasteScript.movementSpeedBonus = 5f;
         hasteScript.target             = control;
         hasteScript.onApply();
     }
 }
Example #3
0
    public override void Cast(Vector3 mousePos, Vector2 direction)
    {
        GameObject smokeBomb = Instantiate(smokeBombPrefab, parent.transform.position, parent.transform.localRotation);

        GameObject hasteInstance = Instantiate(hasteStatusPrefab);
        Haste      hasteScript   = hasteInstance.GetComponent <Haste>();

        hasteScript.duration           = 3f;
        hasteScript.movementSpeedBonus = 15f;
        hasteScript.target             = parent.GetComponent <Entity>();
        hasteScript.onApply();

        Destroy(smokeBomb, 0.475f);
        goOnCooldown();
    }