예제 #1
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);
        }
예제 #2
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>();
        }