public void SetExplosionData(int damage = 150, float radius = 4f, bool unstableRadius = false, EffectShapeType explosionType = EffectShapeType.Circle, float shakeDistance = 8, int minDamage = 2, float maxEffectDuration = .25f, float minEffectDuration = .05f)
 {
     this.damage            = damage;
     this.radius            = radius;
     this.unstableRadius    = unstableRadius;
     this.explosionType     = explosionType;
     this.shakeDistance     = shakeDistance;
     this.minDamage         = minDamage;
     this.maxEffectDuration = maxEffectDuration;
     this.minEffectDuration = minEffectDuration;
 }
Beispiel #2
0
    /// <summary>
    /// Creates new center-based Effect Shape
    /// Right now all Effect Shapes are center based
    /// </summary>
    /// <param name="type">The type of a new shape</param>
    /// <param name="center"></param>
    /// <param name="radius"></param>
    /// <returns></returns>
    public static EffectShape CreateEffectShape(EffectShapeType type, Vector3Int center, int radius)
    {
        switch (type)
        {
        case EffectShapeType.Square:
            return(new SquareEffectShape(center, radius));

        case EffectShapeType.Bomberman:
            return(new BombermanEffectShape(center, radius));

        case EffectShapeType.Diamond:
            return(new DiamondEffectShape(center, radius));

        case EffectShapeType.Circle:
            return(new CircleEffectShape(center, radius));
        }

        throw new System.NotImplementedException("Unknown type " + type);
    }