public void SendCollisionMessage(ZeroHitbox receiver, ZeroHitbox collider, string message) { HitboxCollisionInfo collisionInfo = new HitboxCollisionInfo(); collisionInfo.GameObject = collider.gameObject; collisionInfo.CurrentAnimation = receiver.AnimationClips[receiver.AnimationClipsIndex].Name; receiver.gameObject.SendMessage(message, collisionInfo, SendMessageOptions.DontRequireReceiver); }
public TargetComponents(UnityEngine.Object target) { ZeroHitbox = (target as ZeroHitbox); GameObject = ZeroHitbox.gameObject; Animator = ZeroHitbox.GetComponent <Animator>(); SpriteRenderer = GameObject.GetComponent <SpriteRenderer>(); spriteWhenGotFocus = SpriteRenderer.sprite; }
public void AddAlphaHitbox(ZeroHitbox alphaHitbox) { //TODO check this projectile thing //ProjectileController pController = alphaHitbox.GetComponent<ProjectileController>(); //if (pController != null) //{ // alphaHitbox.IsProjectile = true; // alphaHitbox.ProjectileController = pController; //} hitboxList.Add(alphaHitbox); }
public ZeroHitBoxClipsFeeder(ZeroHitbox zeroHitbox) { this.zeroHitbox = zeroHitbox; }