private void Start()
        {
            playerShip = GetComponent <PlayerShip>();

            moveFwdCmd    = new MoveForwardCommand();
            rotateCmd     = new RotateCommand();
            shootCmd      = new ShootCommand();
            hyperspaceCmd = new HyperspaceCommand();

            thrustInput   = 0;
            rotationInput = 0;
            lastTime      = 0;
        }
Example #2
0
        private void SpawnPlayer()
        {
            GameObject playerObj = Instantiate(playerPrefab);

            playerShip = playerObj.GetComponent <PlayerShip>();
        }