private void Awake() { rb = GetComponent <Rigidbody2D>(); et = GetComponent <EffectTools>(); animator = GetComponent <Animator>(); col = GetComponent <Collider2D>(); navigator = GetComponent <NpcNavigator>(); }
private void EffectTools_OnEffectCreated(AnimationEffect animationEffect) { timeOfDraw = Time.time; GunEffect gunEffect = animationEffect.effect.GetComponent <GunEffect>(); EffectTools gunEffectTools = gunEffect.GetComponent <EffectTools>(); gunEffect.transform.position = transform.GetChild(0).position; gunEffect.transform.rotation = transform.rotation; gunEffect.transform.localScale = transform.localScale; gunEffect.dispatcher.OnDispatch += Dispatcher_OnDispatch; }
public GameObject Create(EffectTools e) { GameObject instance = Instantiate(effect); instance.transform.position = (origin ? origin.position : e.transform.position) + offset; if (useCreatorAsParent) { instance.transform.SetParent(e.transform); } else if (parent) { instance.transform.SetParent(parent); } if (effectName != null && effectName != "") { instance.name = effectName; } return(instance); }
public abstract void Trigger(EffectTools et);
public override void Trigger(EffectTools et) { CameraShaker.Shake(strength, duration); }
public override void Trigger(EffectTools et) { et.SlowTime(duration, timeModifier); }