public PlayerCamMotor(ICamInput input, Transform player, Camera cam, UnitSettings settings) { this.input = input; this.player = player; this.cam = cam; this.settings = settings; }
// add new attacksystem here private void Start() { playerInput = unitSettings.IsPlayer ? new PlayerController() as IUnitInput: new SlimeController(); jumpSystem = new JumpSystem(); motor = new UnitMotor(playerInput, jumpSystem, GetComponent <Rigidbody>(), unitSettings); if (cam != null) { playerCamInput = new PlayerController(); camMotor = new PlayerCamMotor(playerCamInput, GetComponent <Transform>(), cam, unitSettings); } }