public override void OnEquipped() { base.OnEquipped(); coneDecal.Position = coneSpring.TargetPosition; coneSpring.RelativePosition = Vector2.Zero; coneDecal.ToggleVisible(true); shootFX.ToggleVisible(true); }
public override void OnAddedToScene() { base.OnAddedToScene(); var coneTexture = Scene.Content.LoadTexture(ContentPaths.Scoop_Cone); coneDecal = Scene.AddEntity(new SpriteEntity(coneTexture, Constants.Layer_WeaponOver, 0.5f)); this.coneSpring = coneDecal.AddComponent(new EntitySpringComponent(this, weaponMountOffset, 5)); coneDecal.ToggleVisible(this.defaultVisible); shootFX = Scene.AddEntity(new AnimatedEntity()); AddFXAnimation(); shootFX.ToggleVisible(this.defaultVisible); }
public override void OnAddedToScene() { base.OnAddedToScene(); var coneTexture = Scene.Content.LoadTexture(ContentPaths.Scoop_Cone); coneDecal = Scene.AddEntity(new SpriteEntity(coneTexture, Constants.RenderLayer_Truck, 0.5f)); coneDecal.ToggleVisible(defaultVisible); coneSpring = coneDecal.AddComponent(new EntitySpringComponent(this, weaponMountOffset, 5)); shootFX = Scene.AddEntity(new AnimatedEntity()); AddFXAnimation(); shootFX.ToggleVisible(defaultVisible); playerMove = weaponComponent.GetComponent <PlayerMovementComponent>(); }
public override void OnAddedToScene() { base.OnAddedToScene(); var popsicleTexture = Scene.Content.LoadTexture(ContentPaths.Popsicle + "Popsicle_Basic.png"); this.loadedPopsicle = Scene.AddEntity(new SpriteEntity(popsicleTexture, Constants.Layer_WeaponOver, 0.5f)); this.loadedPopsicle.ToggleVisible(this.defaultVisible); this.shatterFX = Scene.AddEntity(new AnimatedEntity()); AddFXAnimation(); shatterFX.ToggleVisible(false); shatterFX.animator.RenderLayer = Constants.Layer_WeaponOver; shatterFX.animator.LayerDepth = 0.4f; shatterFX.animator.OnAnimationCompletedEvent += (s) => ReloadPopsicle(); }
public override void OnUnequipped() { base.OnUnequipped(); shatterFX.ToggleVisible(false); loadedPopsicle.ToggleVisible(false); }