internal SniperPrimaryInstanceData( SniperReloadableFireSkillDef def, EntityStateMachine reloadTargetStatemachine, ReloadParams reloadParams, GenericSkill skillSlot ) { this.def = def; this.reloadStatemachine = reloadTargetStatemachine; this.reloadParams = reloadParams; _ = ReloadUIController.GetReloadTexture(this.reloadParams); this.secondarySlot = this.reloadStatemachine.commonComponents.characterBody.skillLocator.secondary; this.isReloading = true; this.currentReloadTier = ReloadTier.Perfect; this.skillSlot = skillSlot; this.skillSlot.stock = this.def.stockToReload; this.body = this.skillSlot.characterBody as SniperCharacterBody; this.body.CheckIn(this); }
internal static SniperReloadableFireSkillDef Create <TPrimaryData, TReload>(String fireStateMachineName, String reloadStateMachineName) where TPrimaryData : struct, ISniperPrimaryDataProvider where TReload : EntityState, ISniperReloadState { SniperReloadableFireSkillDef def = ScriptableObject.CreateInstance <SniperReloadableFireSkillDef>(); def.activationState = SkillsCore.StateType <SnipeState <TPrimaryData> >(); def.activationStateMachineName = fireStateMachineName; def.baseRechargeInterval = 1f; def.beginSkillCooldownOnSkillEnd = true; def.canceledFromSprinting = false; def.isCombatSkill = true; def.fullRestockOnAssign = false; def.mustKeyPress = true; def.noSprint = true; def.reloadActivationState = SkillsCore.StateType <TReload>(); def.reloadStateMachineName = reloadStateMachineName; def.baseMaxStock = 0; return(def); }