Beispiel #1
0
        public override void OnEquipped()
        {
            base.OnEquipped();
            coneDecal.Position          = coneSpring.TargetPosition;
            coneSpring.RelativePosition = Vector2.Zero;

            coneDecal.ToggleVisible(true);
            shootFX.ToggleVisible(true);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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>();
        }
Beispiel #4
0
        public override void OnAddedToScene()
        {
            base.OnAddedToScene();

            var popsicleTexture = Scene.Content.LoadTexture(ContentPaths.Popsicle + "Popsicle_Basic.png");

            loadedPopsicle = Scene.AddEntity(new SpriteEntity(popsicleTexture, Constants.RenderLayer_Truck, 0.5f));
            loadedPopsicle.ToggleVisible(defaultVisible);

            shatterFX = Scene.AddEntity(new AnimatedEntity());
            AddFXAnimation();
            shatterFX.ToggleVisible(false);
            shatterFX.animator.RenderLayer = Constants.RenderLayer_Truck;
            shatterFX.animator.LayerDepth  = 0.4f;
            shatterFX.animator.OnAnimationCompletedEvent += (s) => ReloadPopsicle();
        }
Beispiel #5
0
 public override void OnEquipped()
 {
     base.OnEquipped();
     loadedPopsicle.ToggleVisible(true);
 }