public override void OnUpdate() { Pointer <BulletClass> pBullet = Owner.OwnerObject; BulletTypeExt extType = Owner.Type; CoordStruct nextLocation = pBullet.Ref.Base.Base.GetCoords(); nextLocation.Z += 0; if (lastLocation == default(CoordStruct)) { lastLocation = nextLocation; } if (lastLocation.DistanceFrom(nextLocation) > 50) { Pointer <LaserDrawClass> pLaser = YRMemory.Create <LaserDrawClass>(lastLocation, nextLocation, innerColor, outerColor, outerSpread, 50); pLaser.Ref.Thickness = 6; pLaser.Ref.IsHouseColor = true; //Logger.Log("laser [({0}, {1}, {2}) -> ({3}, {4}, {5})]", lastLocation.X, lastLocation.Y, lastLocation.Z, nextLocation.X, nextLocation.Y, nextLocation.Z); lastLocation = nextLocation; } const int radius = 100; pBullet.Ref.Base.Location += new CoordStruct((int)(Math.Cos(angle * Math.PI / 180) * radius), (int)(Math.Sin(angle * Math.PI / 180) * radius), 100) * (pBullet.Ref.Velocity.Z > -20 ? 1 : -1); angle = (angle + 25) % 360; }
public override void OnUpdate() { Pointer <BulletClass> pBullet = Owner.OwnerObject; BulletTypeExt extType = Owner.Type; CoordStruct location = pBullet.Ref.Base.Base.GetCoords(); location += new CoordStruct(random.Next(100, 500), random.Next(100, 500), random.Next(100, 500)); Pointer <AnimClass> pLaser = YRMemory.Create <AnimClass>(pAnimType, location); pBullet.Ref.Velocity.Z = 70 * factor; factor = factor - 0.02; }
static public unsafe UInt32 BulletTypeClass_LoadFromINI(REGISTERS *R) { return(BulletTypeExt.BulletTypeClass_LoadFromINI(R)); }
static public unsafe UInt32 BulletTypeClass_Save_Suffix(REGISTERS *R) { return(BulletTypeExt.BulletTypeClass_Save_Suffix(R)); }
static public unsafe UInt32 BulletTypeClass_SDDTOR(REGISTERS *R) { return(BulletTypeExt.BulletTypeClass_SDDTOR(R)); }