# Player.alive is undefined

**URL:** <https://phaser.discourse.group/t/player-alive-is-undefined/3116>\
**Category:** Phaser 3\
**Created:** [July 15, 2019, 10:42am UTC](https://phaser.discourse.group/t/player-alive-is-undefined/3116 "2019-07-15T10:42:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lapamplemousse](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@lapamplemousse](https://phaser.discourse.group/u/lapamplemousse)\
**Post date:** [July 15, 2019, 10:42am UTC](https://phaser.discourse.group/t/player-alive-is-undefined/3116/1 "2019-07-15T10:42:00Z")

</div>

I am trying to add phaser 3 games to my ionic 4 application using this method found on github ([https://github.com/write2sv/ionic4-phaser3-template/commits/master](https://github.com/write2sv/ionic4-phaser3-template/commits/master)).

This means rewriting my games in typescript, and some other changes. one big issue I am coming across is defining my player as alive which is the first if statement in my update(). it just returns undefined and I do not understand why. Can anyone help me on how to get around this??

Here is how I define my player:

```
 player = this.physics.add.sprite(window.innerWidth / 2, window.innerHeight - 100, 'ship');
 player.setOrigin(.5, .5);
 //this.physics.enable(player, Phaser.Physics.Arcade);
 player.physicsBodyType = Phaser.Physics.Arcade;

```

I have tried using .enable but I get the following error :“Property ‘enable’ does not exist on type ‘ArcadePhysics’”

Another possible cause:

I get the following error with startSystem “Property ‘startSystem’ does not exist on type ‘ArcadePhysics’.” by adding a physics sprite I thought I would get around both these error’s but no

this.physics.startSystem(Phaser.Physics.Arcade);
