예제 #1
0
    public override void AttackEventA(int Phase)
    {
        List <List <ZDObject> > AllHitObject = new List <List <ZDObject> >();

        // Really do attack
        switch (Phase)
        {
        case 0:
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(1, 1), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(1, -1), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(-1, 1), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(-1, -1), AttackRad), this, EObjectType.ADamage));
            break;

        case 1:
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(1, 1), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(1, -1), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(-1, 1), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(-1, -1), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(2, 2), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(2, -2), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(-2, 2), AttackRad), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(ZDGameRule.RotateVector2(new Vector2(-2, -2), AttackRad), this, EObjectType.ADamage));
            break;
        }
        ApplyDamage(AllHitObject, EAttackType.A);
    }
예제 #2
0
    public override void AttackEventB(int Phase)
    {
        List <List <ZDObject> > AllHitObject = new List <List <ZDObject> >();

        // Really do attack
        switch (Phase)
        {
        case 0:
            AllHitObject.Add(ZDMap.HitAt(new Vector2(1, 0), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(2, 0), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(-1, 0), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(-2, 0), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(0, 1), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(0, -1), this, EObjectType.ADamage));
            break;

        case 1:
            AllHitObject.Add(ZDMap.HitAt(new Vector2(0, 2), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(0, -2), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(3, 0), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(3, 1), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(3, -1), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(-3, 0), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(-3, 1), this, EObjectType.ADamage));
            AllHitObject.Add(ZDMap.HitAt(new Vector2(-3, -1), this, EObjectType.ADamage));
            break;
        }
        ApplyDamage(AllHitObject, EAttackType.B);
    }
예제 #3
0
    IEnumerator AttackingR()
    {
        if (!Ulting)
        {
            Ulting = true;
            while (Ulting &&
                   (animator.GetCurrentAnimatorStateInfo(0).IsName("AttackR_Loop") ||
                    animator.GetCurrentAnimatorStateInfo(0).IsName("AttackR_Start")))
            {
                yield return(new WaitForSeconds(0.33f));

                List <List <ZDObject> > AllHitObject = new List <List <ZDObject> >();
                AllHitObject.Add(ZDMap.HitAt(new Vector2(0, 1), this, EObjectType.ADamage));
                AllHitObject.Add(ZDMap.HitAt(new Vector2(0, -1), this, EObjectType.ADamage));
                AllHitObject.Add(ZDMap.HitAt(new Vector2(1, 0), this, EObjectType.ADamage));
                AllHitObject.Add(ZDMap.HitAt(new Vector2(-1, 0), this, EObjectType.ADamage));
                AllHitObject.Add(ZDMap.HitAt(new Vector2(1, 1), this, EObjectType.ADamage));
                AllHitObject.Add(ZDMap.HitAt(new Vector2(1, -1), this, EObjectType.ADamage));
                AllHitObject.Add(ZDMap.HitAt(new Vector2(-1, 1), this, EObjectType.ADamage));
                AllHitObject.Add(ZDMap.HitAt(new Vector2(-1, -1), this, EObjectType.ADamage));
                ApplyDamage(AllHitObject, EAttackType.R);
            }
            Ulting = false;
        }
    }