Search Results for

    Show / Hide Table of Contents

    Class LaserOption

    Properties that modify the behavior of lasers.

    Inheritance
    System.Object
    LaserOption
    Implements
    System.IEquatable<LaserOption>
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Danmokou.Danmaku.Options
    Assembly: cs.temp.dll.dll
    Syntax
    public class LaserOption : IEquatable<LaserOption>

    Methods

    BeforeDraw(BPY)

    Set some values in the custom data context once per frame, right before drawing the laser.
    Use this to calculate for player lasers.

    Declaration
    public static LaserOption BeforeDraw(BPY setter)
    Parameters
    Type Name Description
    BPY setter

    A function that modifies the using . The return value is discarded.

    Returns
    Type Description
    LaserOption

    Damage(GCXF<Single>)

    Set the amount of damage that an NPC laser does to a player.

    Declaration
    public static LaserOption Damage(GCXF<float> damage)
    Parameters
    Type Name Description
    GCXF<System.Single> damage
    Returns
    Type Description
    LaserOption

    Deactivate(Pred)

    Every frame, if the condition is true, sets LastActiveTime in private data hoisting to the current laser time (but only once).

    Declaration
    public static LaserOption Deactivate(Pred cond)
    Parameters
    Type Name Description
    Pred cond
    Returns
    Type Description
    LaserOption

    Delete(Pred)

    Every frame, the laser will check the condition and destroy itself if it is true.
    Note: This is generally only necessary for player lasers.
    Note: This is the same as BehOption.Delete.

    Declaration
    public static LaserOption Delete(Pred cond)
    Parameters
    Type Name Description
    Pred cond
    Returns
    Type Description
    LaserOption

    dSFX()

    Play the default sound effects (sfx2 x-laser-fire x-laser-on).

    Declaration
    public static LaserOption dSFX()
    Returns
    Type Description
    LaserOption

    Dynamic(LVTP)

    Draw a curved laser that does update.

    Declaration
    public static LaserOption Dynamic(LVTP path)
    Parameters
    Type Name Description
    LVTP path
    Returns
    Type Description
    LaserOption

    Endpoint(String)

    Draw a laser with an endpoint BEH.

    Declaration
    public static LaserOption Endpoint(string behid)
    Parameters
    Type Name Description
    System.String behid
    Returns
    Type Description
    LaserOption

    High()

    Declaration
    public static LaserOption High()
    Returns
    Type Description
    LaserOption

    HueShift(BPY)

    Provide a function that indicates how much to shift the color of the summon (in degrees) at any point in time.
    WARNING: This is a rendering function. Do not use rand (brand ok), or else replays will desync.

    Declaration
    public static LaserOption HueShift(BPY shift)
    Parameters
    Type Name Description
    BPY shift
    Returns
    Type Description
    LaserOption

    Length(GCXF<Single>)

    Set the length, in time, of a laser.

    Declaration
    public static LaserOption Length(GCXF<float> maxLength)
    Parameters
    Type Name Description
    GCXF<System.Single> maxLength
    Returns
    Type Description
    LaserOption

    Low()

    Declaration
    public static LaserOption Low()
    Returns
    Type Description
    LaserOption

    NoGraze()

    Set that an NPC laser is not allowed to cause grazes against the player.

    Declaration
    public static LaserOption NoGraze()
    Returns
    Type Description
    LaserOption

    Nonpiercing()

    By default, lasers go through enemies. Setting this makes lasers stop at the first enemy.
    Requires Dynamic(LVTP) to also be used.

    Declaration
    public static LaserOption Nonpiercing()
    Returns
    Type Description
    LaserOption

    OnHit(String)

    Add an on-hit effect to the bullet. (For player bullets, use Player(Int32, Int32, Int32, String) instead.)

    Declaration
    public static LaserOption OnHit(string onHit)
    Parameters
    Type Name Description
    System.String onHit
    Returns
    Type Description
    LaserOption

    Player(Int32, Int32, Int32, String)

    Mark the bullet as a player shot.

    Declaration
    public static LaserOption Player(int cdFrames, int bossDmg, int stageDmg, string onHit)
    Parameters
    Type Name Description
    System.Int32 cdFrames

    Cooldown between successive hits

    System.Int32 bossDmg

    Damage against boss enemies

    System.Int32 stageDmg

    Damage against stage enemies

    System.String onHit

    On-hit effect

    Returns
    Type Description
    LaserOption

    Recolor(TP4, TP4)

    Manually construct a two-color gradient for the object.
    Note: This will only have effect if you use it with the recolor palette.
    WARNING: This is a rendering function. Do not use rand (brand ok), or else replays will desync.

    Declaration
    public static LaserOption Recolor(TP4 black, TP4 white)
    Parameters
    Type Name Description
    TP4 black
    TP4 white
    Returns
    Type Description
    LaserOption

    Repeat()

    Set a laser to repeat.

    Declaration
    public static LaserOption Repeat()
    Returns
    Type Description
    LaserOption

    RepeatF(GCXF<Boolean>)

    Set a laser to repeat iff the function is true.

    Declaration
    public static LaserOption RepeatF(GCXF<bool> func)
    Parameters
    Type Name Description
    GCXF<System.Boolean> func
    Returns
    Type Description
    LaserOption

    Rotate(GCXF<Single>, BPY)

    Draw a straight laser that rotates.

    Declaration
    public static LaserOption Rotate(GCXF<float> rotOffset, BPY rot)
    Parameters
    Type Name Description
    GCXF<System.Single> rotOffset

    Initial angle in degrees

    BPY rot

    Additional rotation as a function of time in degrees

    Returns
    Type Description
    LaserOption

    S(GCXF<Single>)

    Set the width of the laser as a multiplier. The base size is a thickness of 0.2 screen units.

    Declaration
    public static LaserOption S(GCXF<float> scale)
    Parameters
    Type Name Description
    GCXF<System.Single> scale
    Returns
    Type Description
    LaserOption

    SFX(String)

    Play a sound effect when the laser turns on.

    Declaration
    public static LaserOption SFX(string sfx)
    Parameters
    Type Name Description
    System.String sfx
    Returns
    Type Description
    LaserOption

    SFX2(String, String)

    Play a sound effect when the laser is fired and when the laser is turned on.

    Declaration
    public static LaserOption SFX2(string onFire, string onOn)
    Parameters
    Type Name Description
    System.String onFire
    System.String onOn
    Returns
    Type Description
    LaserOption

    SM(StateMachine)

    Run a StateMachine on a laser.

    Declaration
    public static LaserOption SM(StateMachine sm)
    Parameters
    Type Name Description
    StateMachine sm
    Returns
    Type Description
    LaserOption

    Stagger(Single)

    Declaration
    public static LaserOption Stagger(float mult)
    Parameters
    Type Name Description
    System.Single mult
    Returns
    Type Description
    LaserOption

    Start(BPY)

    Set the time along the laser length at which the laser starts drawing.

    Declaration
    public static LaserOption Start(BPY time)
    Parameters
    Type Name Description
    BPY time
    Returns
    Type Description
    LaserOption

    Static(LVTP)

    Draw a curved laser that does not update.

    Declaration
    public static LaserOption Static(LVTP path)
    Parameters
    Type Name Description
    LVTP path
    Returns
    Type Description
    LaserOption

    Straight(GCXF<Single>)

    Draw a straight laser at an angle.

    Declaration
    public static LaserOption Straight(GCXF<float> rotOffset)
    Parameters
    Type Name Description
    GCXF<System.Single> rotOffset

    Angle in degrees

    Returns
    Type Description
    LaserOption

    Tint(TP4)

    Tint the laser. This is a multiplicative effect on its normal color.
    WARNING: This is a rendering function. Do not use rand (brand ok), or else replays will desync.

    Declaration
    public static LaserOption Tint(TP4 tint)
    Parameters
    Type Name Description
    TP4 tint
    Returns
    Type Description
    LaserOption

    VarLength(GCXF<Single>, BPY)

    Set the length, in time, of a laser. The length may be variable but bounded by a maximum.

    Declaration
    public static LaserOption VarLength(GCXF<float> maxLength, BPY length)
    Parameters
    Type Name Description
    GCXF<System.Single> maxLength
    BPY length
    Returns
    Type Description
    LaserOption

    Implements

    System.IEquatable<T>
    In This Article
    Back to top Generated by DocFX