// Token: 0x06002031 RID: 8241 RVA: 0x00099E58 File Offset: 0x00098058 public ProjectileWeapon(WeaponItem item, ProjectileWeaponDecorator decorator, IWeaponController controller, UberStrikeItemWeaponView view) : base(item, controller) { this._view = view; this._decorator = decorator; this.MaxConcurrentProjectiles = item.Configuration.MaxConcurrentProjectiles; this.MinProjectileDistance = item.Configuration.MinProjectileDistance; this.ExplosionType = item.Configuration.ParticleEffect; }
public override void BeginState() { shipTransform = transform; targetingSystem = this.GetComponent <IEnemyTargetingSystem>(); weaponController = this.GetComponent <IWeaponController>(); stateManager = this.GetComponent <IStateManager>(); movementController = this.GetComponent <IMovementController>(); targetingSystem.SelectNearestTarget(); }
public void InitialiseDesktop() { playerMovement = this.GetComponent <IMovement>(); playerWeapons = this.GetComponent <IWeaponController>(); pauseChecker = this.GetComponent <ICheckPaused>(); shipDetacher = this.GetComponent <IShipToPlatformAction>(); centerPosition = new Vector2(); centerPosition.x = Screen.width / 2; centerPosition.y = Screen.height / 2; }
private void Configure() { IWeaponController weaponController = InterfaceService.GetInterface <IWeaponController>(); ITargetController targetController = InterfaceService.GetInterface <ITargetController>(); IGameController gameController = InterfaceService.GetInterface <IGameController>(); IScoreUIController scoreUIController = InterfaceService.GetInterface <IScoreUIController>(); weaponController.Initialize(_gameControllerSettings.WeaponSettings, _weaponPoolService); targetController.Initialize(_gameControllerSettings.TargetSettings); scoreUIController.Initialize(_scoreUIControllerSettings, _uiPoolService); gameController.Initialize(_gameControllerSettings); }
public override void BeginState() { mainCamera = Camera.main; timer = new SimpleTimer(2f, Time.deltaTime); shipTransform = transform; movementController = this.GetComponent <IMovementController>(); weaponController = this.GetComponent <IWeaponController>(); targetingSystem = this.GetComponent <IEnemyTargetingSystem>(); stateManager = this.GetComponent <IStateManager>(); movementController.SetMovement(Vector2.zero); targetingSystem.SelectNearestTarget(); }
private void InitialiseWeaponSystems() { IEnemyTargetingSystem targetingSystem = this.GetComponent <IEnemyTargetingSystem>(); targetingSystem.InitialiseTargetingSystem(); IWeaponController weaponController = this.GetComponent <IWeaponController>(); weaponController.InitialiseWeaponController(); IDamageable damageManager = this.GetComponent <IDamageable>(); damageManager.InitialiseComponent(); }
// Token: 0x0600206A RID: 8298 RVA: 0x0009ABFC File Offset: 0x00098DFC private void CreateWeaponLogic(UberStrikeItemWeaponView view, IWeaponController controller) { switch (view.ItemClass) { case UberstrikeItemClass.WeaponMelee: this.Decorator = this.InstantiateWeaponDecorator(view.ID); this.Item = this.Decorator.GetComponent <WeaponItem>(); this.Logic = new MeleeWeapon(this.Item, this.Decorator as MeleeWeaponDecorator, controller); return; case UberstrikeItemClass.WeaponMachinegun: this.Decorator = this.InstantiateWeaponDecorator(view.ID); this.Item = this.Decorator.GetComponent <WeaponItem>(); if (view.ProjectilesPerShot > 1) { this.Logic = new InstantMultiHitWeapon(this.Item, this.Decorator, view.ProjectilesPerShot, controller, view); } else { this.Logic = new InstantHitWeapon(this.Item, this.Decorator, controller, view); } return; case UberstrikeItemClass.WeaponShotgun: this.Decorator = this.InstantiateWeaponDecorator(view.ID); this.Item = this.Decorator.GetComponent <WeaponItem>(); this.Logic = new InstantMultiHitWeapon(this.Item, this.Decorator, view.ProjectilesPerShot, controller, view); return; case UberstrikeItemClass.WeaponSniperRifle: this.Decorator = this.InstantiateWeaponDecorator(view.ID); this.Item = this.Decorator.GetComponent <WeaponItem>(); this.Logic = new InstantHitWeapon(this.Item, this.Decorator, controller, view); return; case UberstrikeItemClass.WeaponCannon: case UberstrikeItemClass.WeaponSplattergun: case UberstrikeItemClass.WeaponLauncher: { ProjectileWeaponDecorator projectileWeaponDecorator = this.CreateProjectileWeaponDecorator(view.ID, view.MissileTimeToDetonate); this.Item = projectileWeaponDecorator.GetComponent <WeaponItem>(); this.Logic = new ProjectileWeapon(this.Item, projectileWeaponDecorator, controller, view); this.Decorator = projectileWeaponDecorator; return; } } throw new Exception("Failed to create weapon logic!"); }
// Token: 0x06002069 RID: 8297 RVA: 0x0009AB68 File Offset: 0x00098D68 private void Initialize(IWeaponController controller, Transform attachPoint) { this.CreateWeaponLogic(this.View, controller); this.CreateWeaponInputHandler(this.Item, this.Logic, this.Decorator, controller.IsLocal); this.ConfigureWeaponDecorator(attachPoint); if (controller.IsLocal) { this.Decorator.EnableShootAnimation = true; this.Decorator.IronSightPosition = this.Item.Configuration.IronSightPosition; } else { this.Decorator.EnableShootAnimation = false; this.Decorator.DefaultPosition = Vector3.zero; } }
// Token: 0x0600200A RID: 8202 RVA: 0x000151FB File Offset: 0x000133FB public InstantMultiHitWeapon(WeaponItem item, BaseWeaponDecorator decorator, int shotGauge, IWeaponController controller, UberStrikeItemWeaponView view) : base(item, controller) { this.ShotgunGauge = shotGauge; this._view = view; this._decorator = decorator; }
// Token: 0x06002007 RID: 8199 RVA: 0x000151C0 File Offset: 0x000133C0 public InstantHitWeapon(WeaponItem item, BaseWeaponDecorator decorator, IWeaponController controller, UberStrikeItemWeaponView view) : base(item, controller) { this._view = view; this._decorator = decorator; this._supportIronSight = (view.WeaponSecondaryAction == 2); }
// Token: 0x0600200D RID: 8205 RVA: 0x00015224 File Offset: 0x00013424 public MeleeWeapon(WeaponItem item, MeleeWeaponDecorator decorator, IWeaponController controller) : base(item, controller) { this._decorator = decorator; }
public static void Register(IWeaponController controller) { controllers[controller.WeaponName] = controller; }
private void Start() { this.timer = new Timer(0.20f); this.gunbanks = new List<Gunbank>(transform.GetComponentsInChildren<Gunbank>()); if (this.gunbanks.Count != 0) { this.currentGunbank = gunbanks[0]; this.controller = WeaponManager.GetWeaponController(gunbanks[0].weaponId); } }
// Token: 0x06002059 RID: 8281 RVA: 0x0001542B File Offset: 0x0001362B public WeaponSlot(global::LoadoutSlotType slot, IUnityItem item, Transform attachPoint, IWeaponController controller) { this.UnityItem = item; this.View = (item.View as UberStrikeItemWeaponView); this.Slot = slot; this.Initialize(controller, attachPoint); }
// Token: 0x06001FE9 RID: 8169 RVA: 0x00015070 File Offset: 0x00013270 protected BaseWeaponLogic(WeaponItem item, IWeaponController controller) { this.Controller = controller; this.Config = item.Configuration; }