Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    public TargetComponents(UnityEngine.Object target)
    {
        ZeroHitbox = (target as ZeroHitbox);
        GameObject = ZeroHitbox.gameObject;

        Animator = ZeroHitbox.GetComponent <Animator>();

        SpriteRenderer     = GameObject.GetComponent <SpriteRenderer>();
        spriteWhenGotFocus = SpriteRenderer.sprite;
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
    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);
    }
Exemplo n.º 5
0
 public ZeroHitBoxClipsFeeder(ZeroHitbox zeroHitbox)
 {
     this.zeroHitbox = zeroHitbox;
 }
Exemplo n.º 6
0
    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);
    }
Exemplo n.º 7
0
 public ZeroHitBoxClipsFeeder(ZeroHitbox zeroHitbox)
 {
     this.zeroHitbox = zeroHitbox;
 }