public static CrosshairStyler Create(Weapon.Kind kind, PanelOverlayElement parentElement) { switch (kind) { case Weapon.Kind.Pistol: return new RegularCrosshairStyler("RegularCrosshair", parentElement); case Weapon.Kind.Rifle: return new RegularCrosshairStyler("RegularCrosshair", parentElement); } throw new NotSupportedException(kind.ToString() + " not implemented."); }
public WeaponHandler(Character actionPerformer, Weapon weapon) { this.ActionPerformer = actionPerformer; this.Weapon = weapon; }