Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using DarkTonic.MasterAudio;
- public class HeroicStrike : Ability
- {
- public string onHitSFX = "";
- public GameObject slashEffect = null;
- public GameObject bloodEffect = null;
- protected override void Awake ()
- {
- base.Awake();
- }
- protected override void Start ()
- {
- base.Start();
- }
- // Update is called once per frame
- protected override void Update ()
- {
- base.Update();
- }
- protected override void OnMouseDown()
- {
- base.OnMouseDown();
- }
- protected override void OnMouseUp()
- {
- base.OnMouseUp();
- }
- protected override void OnTriggerEnter(Collider other)
- {
- base.OnTriggerEnter(other);
- }
- protected override void OnTriggerExit(Collider other)
- {
- base.OnTriggerExit(other);
- }
- #region INITIALIZING State Callbacks
- protected override void INITIALIZING_Enter()
- {
- base.INITIALIZING_Enter();
- }
- protected override void INITIALIZING_Update()
- {
- base.INITIALIZING_Update();
- }
- protected override void INITIALIZING_Exit()
- {
- base.INITIALIZING_Exit();
- }
- #endregion
- #region SELECTINGTARGET State Callbacks
- protected override void SELECTINGTARGET_Enter()
- {
- base.SELECTINGTARGET_Enter();
- }
- protected override void SELECTINGTARGET_Update()
- {
- base.SELECTINGTARGET_Update();
- }
- protected override void SELECTINGTARGET_Exit()
- {
- base.SELECTINGTARGET_Exit();
- }
- #endregion
- #region TARGETABLE State Callbacks
- protected override void TARGETABLE_Enter()
- {
- base.TARGETABLE_Enter();
- }
- protected override void TARGETABLE_Update()
- {
- base.TARGETABLE_Update();
- }
- protected override void TARGETABLE_Exit()
- {
- base.TARGETABLE_Exit();
- }
- #endregion
- #region TARGETABLE State Callbacks
- protected override void UNTARGETABLE_Enter()
- {
- base.UNTARGETABLE_Enter();
- }
- protected override void UNTARGETABLE_Update()
- {
- base.UNTARGETABLE_Update();
- }
- protected override void UNTARGETABLE_Exit()
- {
- base.UNTARGETABLE_Exit();
- }
- #endregion
- #region NONE State Callbacks
- protected override void NONE_Enter()
- {
- base.NONE_Enter ();
- }
- protected override void NONE_Update()
- {
- base.NONE_Update();
- }
- protected override void NONE_Exit()
- {
- base.NONE_Exit();
- }
- #endregion
- #region CASTING State Callbacks
- protected override void CASTING_Enter()
- {
- base.CASTING_Enter();
- }
- protected override void CASTING_Update()
- {
- base.CASTING_Update();
- }
- protected override void CASTING_Exit()
- {
- MasterAudio.PlaySound(this.onHitSFX);
- if(this.slashEffect != null)
- {
- GameObject go = (GameObject) Instantiate(this.slashEffect, validTargets[0].transform.position + Vector3.up, owner.transform.rotation);
- go.transform.Rotate(Vector3.up * 180.0f);
- }
- if(this.bloodEffect != null)
- {
- Instantiate(bloodEffect, ValidTargets[0].transform.position + Vector3.up, Quaternion.identity);
- Instantiate(bloodEffect, ValidTargets[0].transform.position + Vector3.up, Quaternion.identity);
- }
- CameraController.ShakeCamera(new Vector3(2.0F, 0.0f, 0.0f), 3);
- // // Set buffable to active when animation hits
- GameObject internalCharacter = ValidTargets[0];
- internalCharacter.GetComponent<Character>().onDamagedByOnceHandler += (Character character) =>
- {
- this.ApplyAllBuffables(internalCharacter);
- };
- internalCharacter.GetComponent<Character>().ApplyDamageBy(this.owner, this.finalDamage);
- base.CASTING_Exit();
- }
- #endregion
- #region COOLDOWN State Callbacks
- protected override void COOLDOWN_Enter()
- {
- base.COOLDOWN_Enter();
- }
- protected override void COOLDOWN_Update()
- {
- base.COOLDOWN_Update();
- }
- protected override void COOLDOWN_Exit()
- {
- base.COOLDOWN_Exit();
- }
- #endregion
- }
Advertisement
Add Comment
Please, Sign In to add comment