public void EndPosion(OnStatusEndEventData e) { StatusCollection Collection = e.Target.GetComponentInChildren <StatusCollection>(); if (Collection != null) { Collection.RemoveStatus(Status); } ColorShifter shifter = e.Target.GetComponentInChildren <ColorShifter>(); if (shifter != null) { shifter.ShiftToColor( new Color(0f, 1f, 0f, 1f), new Color(1f, 1f, 1f, 1f), 1f ); StartCoroutine(DestroyAfter(1f)); } else { Destroy(gameObject); } }
public void Charge(OnPointTargetCastEventData e) { //such that the skill cannot be cast again if already in motion if (!IsCharging) { Caster = e.Caster; ColorShifter = Caster.GetComponentInChildren <ColorShifter>(); if (ColorShifter == null) { Debug.LogWarning("No `ColorShifter` shifter component found when attempting to use charge skill"); } MovableBody = Caster.GetComponentInChildren <MovableBody>(); if (MovableBody == null) { throw new MissingComponentException( "No `MovableBody` component found on caster when attempting to use charge skill" ); } Target = e.Target; Origin = e.Caster.transform.position; StartCharging( e.Stats.GetValue("ChargeDuration") + 0.33f, e.Stats.GetValue("ChargeBonusSpeed") + 2f, e.Stats.GetValue("ChargeBonusAcceleration") + 10f ); } }
public void EndConfusion(OnStatusEndEventData e) { MovableBody movableBody = e.Target.GetComponentInChildren <MovableBody>(); if (movableBody != null) { RemoveLastRandomMovement(movableBody); } StatusCollection Collection = e.Target.GetComponentInChildren <StatusCollection>(); if (Collection != null) { Collection.RemoveStatus(Status); } ColorShifter shifter = e.Target.GetComponentInChildren <ColorShifter>(); if (shifter != null) { shifter.ShiftToColor( new Color(1f, 1f, 0f, 1f), new Color(1f, 1f, 1f, 1f), 1f ); StartCoroutine(DestroyAfter(1f)); } else { Destroy(gameObject); } }
// Use this for initialization public override void Awake() { base.Awake(); controller = GameObject.Find("GameController").GetComponent <GameController>(); lines = new List <NodeLine>(); colorShifter = gameObject.GetComponent <ColorShifter>(); highlighter = gameObject.GetComponentInChildren <highlight>(); }
public override void Awake() { base.Awake(); //InteractiveItem = gameObject.GetComponentInChildren<VRInteractiveItem>(); controller = GameObject.Find("GameController").GetComponent <GameController>(); colorShifter = gameObject.GetComponent <ColorShifter>(); highlighter = gameObject.GetComponentInChildren <highlight>(); }
public void StartPosion(OnStatusStartEventData e) { ColorShifter shifter = e.Target.GetComponentInChildren <ColorShifter>(); if (shifter != null) { shifter.ShiftToColor( new Color(1f, 1f, 1f, 1f), new Color(0f, 1f, 0f, 1f), 1f ); } StartCoroutine(RetickAfter(0f, new OnStatusTickEventData(e.Target, e.Source, e.Duration))); }
public void StartConfusion(OnStatusStartEventData e) { LastAddedMovement = Vector3.zero; LastAddedMovementMagnitude = 0f; ColorShifter shifter = e.Target.GetComponentInChildren <ColorShifter>(); if (shifter != null) { shifter.ShiftToColor( new Color(1f, 1f, 1f, 1f), new Color(1f, 1f, 0f, 1f), 1f ); } StartCoroutine(RetickAfter(0f, new OnStatusTickEventData(e.Target, e.Source, e.Duration))); }