private static ActorDefinition CreateWeapon(ActorDefinition inventory) { int totalFrames = inventory.States.Frames.Count; ActorActionFunction lightZeroActionFunc = new ActorActionFunction("A_LIGHT0"); ActorDefinition weapon = new ActorDefinition("WEAPON", inventory); weapon.ActorType.Set(ActorType.Weapon); weapon.Properties.InventoryPickupSound = "MISC/W_PKUP".AsUpper(); weapon.Properties.WeaponDefaultKickBack = true; weapon.States.Labels.Add("LIGHTDONE", totalFrames); weapon.States.Frames.Add(new ActorFrame(totalFrames, "SHTGE", 0, MakeProperties(), lightZeroActionFunc, stop, 0)); return(weapon); }
private static ActorDefinition CreateBaseDefinition() { Optional <ActorActionFunction> genericFreezeDeath = new ActorActionFunction("A_GenericFreezeDeath"); Optional <ActorActionFunction> freezeDeathChunks = new ActorActionFunction("A_FreezeDeathChunks"); ActorDefinition actor = new ActorDefinition("ACTOR", Empty); actor.States.Labels.Add("SPAWN", 0); actor.States.Frames.Add(new ActorFrame(0, "TNT1A", -1, MakeProperties(), MakeNoAction(), stop, 0)); actor.States.Labels.Add("NULL", 1); actor.States.Frames.Add(new ActorFrame(1, "TNT1A", 1, MakeProperties(), MakeNoAction(), stop, 0)); actor.States.Labels.Add("GENERICFREEZEDEATH", 2); actor.States.Frames.Add(new ActorFrame(2, "#####", 5, MakeProperties(), genericFreezeDeath, stop, 1)); actor.States.Frames.Add(new ActorFrame(3, "----A", 1, MakeProperties(), freezeDeathChunks, wait, 0)); actor.States.Labels.Add("GENERICCRUSH", 4); actor.States.Frames.Add(new ActorFrame(4, "POL5A", -1, MakeProperties(), MakeNoAction(), stop, 0)); return(actor); }